Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make click detector that gives animation to player when its clicked? [closed]

Asked by 5 years ago
Edited by User#24403 5 years ago

I am new to Lua so please help me. I was working with this but it was not working:

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)

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?