Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How Can I make a animation clicker?

1 answer

Insert this in a localscript inside a textbutton.

local AnimationID = YOUR ANIMATION ID HERE
local player = game.Players.LocalPlayer
local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid//"..AnimationID
local AnimationTrack = player.Character.Humanoid:LoadAnimation(Animation)
local WAIT_ANIMATION_TO_FINISH = false

script.Parent.MouseButton1Click:Connect(function()
	if WAIT_ANIMATION_TO_FINISH == false then
		WAIT_ANIMATION_TO_FINISH = true
		AnimationTrack:Play()
		wait(AnimationTrack.Length)
		WAIT_ANIMATION_TO_FINISH = false
	end
end

At line 1, you have to insert a animation id. You can create one by yourself. To do this, you insert a dummy in your game with the " Rig Builder" in the plugins. Then, click on the plugin "Animation Editor". A window will appear. Then, click on the dummy you wanna animation and create your animation. Once you finished, find "Export" on the animation window and click it. Then, another window will appear. Click on "New Animaton", and a loading screen will appear. Once the loading is finished, an ID will appear below. Copy it (JUST COPY THE NUMBERS). Then click "OK". The window will close. After, go back to that script I made for you and insert the animation Id a line 1. (Insert it at the right of the "=" sign). Also, make sure to delete "YOUR ANIMATION ID HERE".

Hope this helped!

This discussion is preserved as it was. New answers, comments, and votes are closed.