This is a local script inside a tool, it prints everything out but I can’t see the animation, and there’s no errors.
local state = script.Parent:WaitForChild("State")
local idleanim = script.Parent:WaitForChild("BodyAttach"):WaitForChild("Idle")
local plr = script.Parent.Parent.Parent
state:GetPropertyChangedSignal("Value"):Connect(function()
print("property change")
local char = plr.Character
local hum = char:WaitForChild("Humanoid")
local idletrack = hum.Animator:LoadAnimation(idleanim)
if state.Value == "Idle" then
print("playin")
idletrack:Play()
else
idletrack:Stop()
end
end)
local state = script.Parent:WaitForChild("State")
local idleanim = script.Parent:WaitForChild("BodyAttach"):WaitForChild("Idle")
local plr = script.Parent.Parent.Parent
local char = plr:WaitForChild("Character")
local hum = char:WaitForChild("Humanoid")
local idletrack = hum.Animator:LoadAnimation(idleanim)
state:GetPropertyChangedSignal("Value"):Connect(function()
print("property change")
if state.Value == "Idle" then
print("playing")
if not idletrack.IsPlaying then
idletrack:Play()
end
else
if idletrack.IsPlaying then
idletrack:Stop()
end
end
end)