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

How to make a character not move when spawned?

Well I'm attempting to make the character not move when he or she is spawned. I am having trouble due to not even knowing where to begin... Can someone help?

1 comment

0

you can change the walkspeed value of the character's humanoid, either through the event CharacterAdded or with a local script in playergui

3 answers

✓ Accepted answer

Put a LocalScript in StarterGui and put this in it:

player = game.Players.LocalPlayer --This gets the Player

player.Character.Humanoid.WalkSpeed = 0 --This changes the WalkSpeed of the player.

That would be

game:GetService("Players").Character.Torso.Anchored = true

Put this in a local script

I just finished a script on this. This has to be a normal script for it to work.

game.Players.PlayerAdded:connect(function(player) -- When player enters
	player.CharacterAdded:connect(function(character) -- When the character added
		local humanoid = character:FindFirstChild("Humanoid") -- Find if the player is a humanoid
		humanoid.WalkSpeed = 0 -- Walkspeed of 0 means it gets anchored, or doesn't move.
	end)
end)

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