Code:
local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local loadidleanim = hum:LoadAnimation(idleAnim)
local loadliftanim = hum:LoadAnimation(liftAnim)
tool.Equipped:Connect(function()
loadidleanim:Play()
hum.JumpPower = 0
hum.WalkSpeed = false
end)
tool.Unequipped:Connect(function()
loadidleanim:Stop()
loadliftanim:Stop()
hum.JumpPower = true
hum.WalkSpeed = true
end)
tool.Activated:Connect(function()
loadliftanim:Play()
hum.JumpPower = 0
hum.WalkSpeed = false
end)
pls respond fast!
Doomcolp
(dxxmed)
#2
JumpPower
and WalkSpeed
are properties that only accept integer or number values and not boolean values (like true
or false
)
You’d have to set them to a number value like 16
or set it to something like 0
if you don’t want the player to be able to move or jump
I did that but stills Jumping!
local tool = script.Parent
local idleAnim = tool:WaitForChild("IdleAnimation")
local liftAnim = tool:WaitForChild("LiftAnimation")
local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local loadidleanim = hum:LoadAnimation(idleAnim)
local loadliftanim = hum:LoadAnimation(liftAnim)
tool.Equipped:Connect(function()
loadidleanim:Play()
hum.JumpPower = 0
hum.WalkSpeed = 0
end)
tool.Unequipped:Connect(function()
loadidleanim:Stop()
loadliftanim:Stop()
hum.JumpPower = 7.2
hum.WalkSpeed = 16
end)
tool.Activated:Connect(function()
loadliftanim:Play()
hum.JumpPower = 0
hum.WalkSpeed = 0
end)
Doomcolp
(dxxmed)
#4
Alright try using SetStateEnabled like this:
hum:SetStateEnabled(Enum.HumanoidStateType.Physics, true)
And when you need it to be enabled again just do:
hum:SetStateEnabled(Enum.HumanoidStateType.Physics, false)
system
(system)
Closed
#5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.