Thanks for reading this, and i will give an example of the script, but I need some help with a script about animations. (specifically when you hold the tool and it plays an animation, aka - Tool Idle animation) When i hold the tool, it does play the animation, so it would seem fine, right? Wrong, the animation only plays for the holder, aka it would seem the animation is client-sided only, and this is the problem im having.
The Script:
local tool = script.Parent local anim = Instance.new("Animation") anim.AnimationId = "http://www.roblox.com/Asset?ID=5209981398" local track tool.Equipped:Connect(function() track = script.Parent.Parent.Humanoid:LoadAnimation(anim) track.Priority = Enum.AnimationPriority.Action track.Looped = true track:Play() end) tool.Unequipped:Connect(function() if track then track:Stop() end end)
Can i please get some help from one of you wonderful scripters out there! :)
I would greatly appreciate it and take care in these lockdown times..
Try to set the priority / looped in the animation editor instead of it being scripted, and also make sure none of the baseparts are anchored
Put an global script on starter character scripts and put like this
script.Parent.ChildAdded:Connect(function(Child) if Child.ClassName == "Tool" then if Child:FindFirstChildOfClass("Animation") then local animation = script.Parent.Humanoid:LoadAnimation(Child:FindFirstChildOfClass("Animation")) animation:Play() script.Parent.ChildRemoved:Connect(function(child) if child == Child then animation:Stop() end) end end end)
Hope it works!