RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"When the player clicks the left mouse button, it plays an animation of my choice."
-- local script local Players = game:GetService("Players") local player = Players.LocalPlayer local mouse = player:GetMouse() local animationId = "rbxassetid://YOUR_ANIMATION_ID_HERE" local animation = Instance.new("Animation") animation.AnimationId = animationId local humanoid = player.Character.Humanoid local animator = humanoid:WaitForChild("Animator") local function playAnimation() local animTrack = animator:LoadAnimation(animation) animTrack:Play() end mouse.Button1Down:Connect(playAnimation)