In this script the chunk at the top is loaded animations. These are there to specify when to assign values based on animation. The values show up clearly for me in the properties tab, yet other ingame objects always see the value as 0.
local chara = script.Parent.Parent local anim1 = script.Parent:WaitForChild("swing") local swinganim = chara.Humanoid:LoadAnimation(anim1) local anim2 = script.Parent:WaitForChild("idle") local idleanim = chara.Humanoid:LoadAnimation(anim2) local special = script.Parent:WaitForChild("special") local specialanim = chara.Humanoid:LoadAnimation(special) script.Parent.active.Value = 0 script.Parent.Activated:Connect(function() wait(0.01) if script.Parent.special.IsPlaying == true then script.Parent.active.Value = 1 wait(5) script.Parent.active.Value = 0 else script.Parent.active.Value = 1 wait(0.7) script.Parent.active.Value = 0 end end)
Now the same script, with the animations removed, works perfectly fine. Why?
script.Parent.active.Value = 0 script.Parent.Activated:Connect(function() wait(0.01) script.Parent.active.Value = 1 wait(0.7) script.Parent.active.Value = 0 end)