Basically, I can't figure out how when a value hits 0, an animation loads into the player with the value that is 0. This is all I have for now, and yes the Animation is mine but it doesn't play.

local plr = script.Parent.Parent
local char=plr.CharacterAdded:wait()
local player=workspace:findFirstChild(plr.Name)
local humanoid = player.Character.Humanoid

while wait() do
	if plr.Ankles.Value <= 0 then
local anim = Instance.new("Animation")
anim.AnimationId = "http://www.roblox.com/asset/?id=529177665"
		local playAnim = humanoid:LoadAnimation(anim)
		playAnim:Play()
		script.Sound:Play()
			end
	plr.Ankles.Value=100 -- How many times do they have to get crossed for them to fall
end

4 comments

0

why are you getting the player's character and then getting the workspace model?

0

because "plr" is the one with the "Ankle" Value and the "player" is the one with humanoid to load the animation

0

it would be more clear if you used script blocks

0

well the thing is idk how :/