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

How to make a ROBLOX character change their position when a command said?

So I want to make an if someone says /e t-pose their arms move into a T position but I'm not sure how to animate but also script that.

1 comment

0

This isn't a request site. Posted problems should include your attempt. Look into Chat Modules by referring to the robloxdev website.

1 answer

Well first of all, you need to make an animation, you could probably look up videos on how to animate, do export, save the animation to your animaitons, find the animation on roblox, and copy the id of it, the id should be in the link.

To put the animation in your script do something like this in starter character scripts as a local script.

local player = game.Players.LocalPlayer
local char = player.Character
local prefix = "/e "

player.Chatted:connect(function(msg)
	if msg:lower() = prefix.. "t-pose" then
		local anim = Instance.new("Animation") -- Creates the animation
		anim.AnimationId = "rbxassetid://animation id here" -- Assigns the id to the animation
		local tposeanim = char.Humanoid.LoadAnimation(anim) -- Loads anim into humanoid
		tposeanim:Play() -- Starts the animation
		wait(Length of animation here) -- Waits for the length of the animation
		tposeanim:Stop() -- Stops the animation after the wait so it doesn't repeat
	end
end)

I hope this managed to help you, and good luck on your games!

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