I know it is deprecated, but how would I update it to the current version, I have no idea how to do this, can somebody help me? This script is on mouse clicked it plays an animation for a boat. The boat is supposed to cross this lake. It has no errors, and deprecated does not mean not working. Please help.

local clickdetector = script.Parent:WaitForChild("ClickDetector")

clickdetector.MouseClick:Connect(function(player)
    local hum = script.Parent:WaitForChild("Humanoid")
    local anim = hum:LoadAnimation(script:FindFirstChildOfClass("Animation"))
    anim.Looped = true
    anim:Play()
end)

3 comments

0

Please give some more information. You told us what should happen, but not what is happening.

0

What is happening is nothing.

0

Humanoid.Animator:LoadAnimation(AnimObject).