What do I want to achieve: I want to have an animation play for your character when you Leftclick.
Issue: I don’t really know how to do this for the mouse.
I know how to do it with a keyboard but not with clicking.
Thanks in advance
What do I want to achieve: I want to have an animation play for your character when you Leftclick.
Issue: I don’t really know how to do this for the mouse.
I know how to do it with a keyboard but not with clicking.
Thanks in advance
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
Mouse.Button1Up:Connect(function()
-- Play animation
end)
local f = false
script.Parent.Activated:Connect(function()
if not f then
f = true
local AN = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
AN:Play()
wait(0.7)
f = false
end
end)