Here's what this looks like: Water ClickDetector --child of water LocalScript -- child of water Animation -- child of LocalScript
What's supposed to happen is when you click the water an animation plays. The animation doesnt play, and no errors in output...
The LocalScript:
player = game.Players.LocalPlayer
animation = script:WaitForChild('Animation') -- the animation is a child of this script
enabled = true
script.Parent.ClickDetector.MouseClick:connect(function()
if enabled == true then
enabled = false
local animationTrack = player.Character.Humanoid:LoadAnimation(animation)
animationTrack:Play()
wait(3)
enabled = true

1 comment
If this script isn't inside the player then you can't use LocalPlayer.