Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-3

How do I make a character anchored while in a intro gui?

Asked by
duckyo01 120
8 years ago

I was thinking a while true like

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

1 answer

Log in to vote
0
Answered by
Uroxus 350 Moderation Voter
8 years ago

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.

0
It only works on roblox studio. duckyo01 120 — 8y
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 :) Uroxus 350 — 8y
0
Everytime I die it redoes this process is there a way to make it do this script once when a player enters? duckyo01 120 — 8y
Ad

Answer this question