I am working on it a few days but I can't make it work. I need help since I am new to Lua. I am trying to create an animation that will play when click detector is clicked. So I just wanted to ask if someone knows how to run animation when a player clicks a click detector. Here is my script I was working on:
local click = game.Workspace.Part.ClickDetector local plr = game.Players.LocalPlayer local hum = plr.Character.Humanoid local animation = game.ReplicatedStorage.Animation local anim_start = hum:LoadAnimation(animation) current = anim_start click.MouseClick:Connect(function() current:Play() end)
I would be glad if someone can fix this script or rewrite it so it will work. Thank you anyways.
Closed as Too Broad by User#24403
This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.
Why was this question closed?