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

[ANSWERED]I still spawn in blue team instead of the admin spawn, how do I fix this?

I'm making a game where there 2 main teams, blue and red. But there is also an admin team. I used this script but when I join the game I'm on the admin team but I spawn at either blue or red spawn and it changes me after I spawn so I don't get the custom character spawn, so how can I edit my script to make it do what I want?

player = game.Players.LocalPlayer
if player.Name == "MegaRaven100" then
 player.Team = game.Teams.Owners
end

1 answer

✓ Accepted answer
game.Players.PlayerAdded:Connect(function(player)
	if player.Name ~= "MegaRaven100" then
	else
		player.TeamColor = BrickColor.new("Really blue")
	end
end)

Make sure to put this in a server script inserted in ServerScriptService. The reason why your script wasn't working is because you wrote it in a local script (I assume this because you wrote "player = game.Players.LocalPlayer). But other than that, it should work! :)

1 comment

0

ty

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