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 make a character anchored while in a intro gui?

I was thinking a while true like

While true do
wait(Introgui)
game.Workspace.Music:Play()

1 answer

We spoke in chat and you told me that the GUI is only visible for 20 seconds. So this script will prevent a player from moving (They can still jump) for 20 seconds...

game.Players.PlayerAdded:connect(function(plr)
	plr.CharacterAdded:connect(function(character)
		wait(.2)
		local hoid = character:WaitForChild("Humanoid")
		hoid.WalkSpeed = 0
		wait(20)
		hoid.WalkSpeed = 16
	end)
end)

It should be a normal script inside of Workshop. If this helps please accept my answer, and if you have any questions please do ask :)

EDIT: The problem was the humanoid had not yet loaded while the script was trying to run. You could either add a small wait() at the start but could still run the risk of it not loading in time so this way is a much safer method.

3 comments

0

It only works on roblox studio.

0

Ah sorry. I guess it's because the script is trying to run but the player's humanoid hasn't yet loaded. Answer edited :)

0

Everytime I die it redoes this process is there a way to make it do this script once when a player enters?

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