Hi, I'm trying to create a button / part which when clicked changes a players animation e.g. from default to levitation, using the Roblox animation packs in the catalog. My problem is that I only want it to effect the local player and not everyone else. Right now I have a script in workspace with the localscript for the animation pack as it's child. It works well but the script changes everyone animation not just the one player. I think to achieve what I won't I would have to use a localscript but I'm not sure how I would translate the code into one.
Here's my script:
l=script:WaitForChild'Animate':clone()
workspace.DescendantAdded:connect(function(v)
game.Workspace.Click2.ClickDetector.MouseClick:Connect(function()
if v.Name=='Animate' then
local c=l:clone()
c.Parent=v.Parent
v:Destroy()
wait()
c.Disabled=false
end
end)
end)
Thanks

4 comments
this so old, so mich deprecation, definately model
Yes I used a model and then edited it to make it work for me
It's still very broken, let me fix it up, I'll post it in asnwers
Thanks