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.

2 comments
I put the code in a code block.
Still more explanation needed, like output errors. Repost when you can ask a better question.