Hello, I’m having problems with spawn locations: I’m trying to make a team selector gui, so normally it works but even if I am on another team like Prisoner and not Neutral, I spawn at the Neutral spawn. So you understand what I mean right? If you could help me, it would be very nice!
I think you should put this in scripting support or something.
I have to warn that I am kind of new to scripting but the way I set spawn locations was with a script. I simply set the players spawn point to the Roblox spawner i wanted. Not sure if I understood the issue though.
game.Players.Playername.RespawnLocation = script.Parent -- script.Parent is location of spawn.
Chances are that after clicking on button to change team you need to respawn to spawn on new spawner. So adding another line that forces your Character to respawn.
game.Players.Playername:LoadCharacter()
Not 100% sure though, good luck anyways!
Ok thanks I’ll try it now but why do I need use this?
Now I tried but it didn’t work
That would make Character respawn, cause if you change the respawn location the person wont spawn there before they reset/respawn. And maybe we could see the code you are trying to make work?
Edit:
Did some extra testing, make sure the script is not “LocalScript” cause that would be client side and would not work. To change respawn location you would need actual script!
You need to set the player’s team property on the server otherwise the change won’t replicate.
Oh but I’m using local script to make it change team and set a gui property enabled to false
I am using player gui and all that stuff
I deleted the code because I still don’t know what to do, so ye, but I can show how it looks like and the stuff that needed:


Try changing the SpawnLocation’s TeamColor.
Also if you want to allow the player to change their team when they touch the SpawnLocation, check AllowTeamChangeOnTouch. Neutral is they will automatically be placed on that SpawnLocation. When the player’s team is changed and their character loads, they will be placed on their team’s SpawnLocation.
The TeamColor is already correct
It must be Medium stone grey, and it must be Neutral because there’s a Neutral team
What I meant with Neutral is still choosing team, there’s an gui
In the GUI, set the player’s TeamColor for the team that you want them to be on, then load their character.
just use RemoteEvent
s
why is everyone having so much trouble lol
I did already but still it doesn’t spawn me even if I am on the team
I don’t know how to use RemoveEvents
Create a new remote event in ReplicatedStorage, name it PrisonerEvent
Next create a local script in the button:
local rs = game.ReplicatedStorage
local Player = game.Players.LocalPlayer
script.Parent.MouseButton1Down:Connect(function()
rs.PrisonerEvent:FireServer(Player)
end)
Next create a script in server script service:
local rs = game.ReplicatedStorage
rs.PrisonerEvent.OnClientEvent(Player)
Player.Team = game.Teams.Prisoner
end)
There is a button in my team selector and it works, it changes the team of a player, but the team only spawn location doesn’t work
You should check what team they are on, then set that was their spawn point.
local player = game.Players.LocalPlayer
if player.Team == game.Teams.Prisoner then
player.SpawnLocation = game.Workspace.PrisonSpawn
end
-- put this in starter character scripts