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

How do I add salute, at ease, and bow to my game?

I've tried putting into the the Starterpack but that's not working

1 answer

Make a ScreenGui and add 3 TextButtons and 1 LocalScript and a Folder. Put (one of each) Salute, At-Ease, and a bow animation in the Folder. Name each TextButton according to their action. Name each animation according to its action. In the LocalScript do:

repeat wait() until game.Players.LocalPlayer.Character
local folder = script.Parent.Folder
local Player = game.Players.LocalPlayer

for i, buttons in pairs (script.Parent:GetChildren()) do
	if buttons:IsA("TextButton") then
		buttons.MouseButton1Click:connect(function()
			for i, anims in pairs (script.Parent.Folder:GetChildren()) do
				if buttons.Name == anims.Name then
					local  animation = Player.Character.Humanoid:LoadAnimation(anim)
					animation:Play()
					wait(1)
					animation:Stop()
				end
			end
		end)
	end
end

This should work, might have to reconfigure some things.

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