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

I have a question on what i can do if i stop a player from spawning?

if i stop a player from spawning does player guis work

2 answers

✓ Accepted answer

Unfortunately, I have run into the same issue as well.

I just allow the characters to spawn, and then when they're done spawning I just destroy them. The guis load, and it achieves the same effect.

4 comments

0

how do you load them again?

0

local Players = Game:GetService("Players") Player:LoadCharacter() (i got this off wiki)

0

player:LoadCharacter() loads their character again.

0

ok thanks

No, StarterGui does not clone it's children to PlayerGui if the character doesn't spawn. But, you could easily spawn a player in a black box, then teleport them when you're done.

EDIT: Teams

A simple solution to this would be to kill the character, but this is a method I dislike, when you could just as easily teleport the player to the spawns, like so:

-- this script needs to be a LocalScript inside the button that you click to spawn
local spawn = game.Workspace:FindFirstChild("RedSpawn") -- you can have multiple spawns named this, it will choose the one at the top of the list
local p = game.Players.LocalPlayer
local button  = script.Parent -- button inside gui that you click to spawn

button.MouseButton1Click:connect(function()
	local char = p.Character
	if char then
		char.Torso.CFrame = spawn.Position + Vector3.new(0,7,0)
		button.Parent:remove() -- closes gui when clicked, in this case, gui is the parent of the button
	end
end

2 comments

0

but if i have teams does it go to a team spawn or any spawn?

0

let me refrais that can i teleport people if there on diffrent teams to diffrent locations

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