I'm trying to stop the character spawning until after the intro GUI. I found this on the wiki and I removed what's on line 19 assuming the player wouldn't spawn when joining. But the player does? Can anyone help me disable character spawning?
Note: I'll make the character spawn using the script in the intro screen.
local respawnTime = 5 local Players = Game:GetService("Players") Players.CharacterAutoLoads = false Players.PlayerAdded:connect(function(Player) Player.CharacterAdded:connect(function(Character) -- find the humanoid, and detect when it dies local Humanoid = Character:FindFirstChild("Humanoid") if Humanoid then Humanoid.Died:connect(function() -- delay, then respawn the character wait(respawnTime) Player:LoadCharacter() end) end end) Player:LoadCharacter() -- load the character for the first time end)
This is pretty simple. Inside the IntroGui script, put this when the IntroGui ends:
local player = script.Parent.Parent.Parent.Parent -- parent 1 = frame, parent 2 = screengui, etc. you do not need this if you already have a player variable player:LoadCharacter()
Yes, it´s as simple as that!