-
What do you want to achieve?
hi guys i wish every player has his own spanwe -
**What is the issue?
I do not know how to do -
What solutions have you tried so far?
if i remember correctly there was a way to make the spawn busy and only 1 player could spawn there
Add teams with the same colours as the spawnpoints and make sure the spawnpoint.Neutral
property is false.
You can do this by adding a script where the player chooses the spawn and when they touch it, the team change on touch feature is disabled for the spawn. You need to enable it again when that player leaves or changes teams.
okey thx , so each player has his own spawn ? and can’t it be 2 players per spawn?
You’d have to set a custom team application for that.
For example if you have 6 max players
:
-- considering your Roblox accessiblity settings set the game's max player
-- amount to 6:
local function FindEmptyTeam(): Team | nil
for _, team in ipairs(game.Teams:GetTeams()) do
if #team:GetPlayers() < 1 then
return team
end
end
return nil
end
game.Players.PlayerAdded:Connect(function(Player)
local getAssignedTeam = FindEmptyTeam()
if getAssignedTeam and typeof(getAssignedTeam) == "Instance" then
Player.Team = getAssignedTeam
end
end)
yes I have 6 players, where should I put this?
Throw it in ServerScriptService as a script should be fine.
ok done thanks! can i ask you the last question?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.