mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51:55 +00:00
Actor support 2 and inheritance
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
local CrouchModule = {
|
||||
IsCrouching = false,
|
||||
StandHeight = 2.1,
|
||||
CrouchHeight = .6,
|
||||
WalkSpeedMultiplier = 6,
|
||||
@@ -23,6 +24,7 @@ function CrouchModule:Crouch(StandingWalkSpeed: number)
|
||||
HipHeight = CrouchModule.CrouchHeight,
|
||||
WalkSpeed = math.max(1, StandingWalkSpeed-CrouchModule.WalkSpeedMultiplier)
|
||||
}, Easing)
|
||||
CrouchModule.IsCrouching = true
|
||||
end
|
||||
|
||||
function CrouchModule:Stand(CrouchingWalkSpeed: number)
|
||||
@@ -32,6 +34,7 @@ function CrouchModule:Stand(CrouchingWalkSpeed: number)
|
||||
HipHeight = CrouchModule.StandHeight,
|
||||
WalkSpeed = math.max(1, CrouchingWalkSpeed+CrouchModule.WalkSpeedMultiplier)
|
||||
}, Easing)
|
||||
CrouchModule.IsCrouching = false
|
||||
end
|
||||
|
||||
return CrouchModule
|
||||
Reference in New Issue
Block a user