greetings all, this is a script which i have which is a group rank team only spawn, it works perfectly fine when im on the “combine” team, though when i switch to a different team, the script still makes me respawn at the “combine” team spawn when i want it to spawn somewhere else, i believe the script just doesn’t register the player team has changed, but i’m not sure how to go about fixing this, i attempted using Player:GetPropertyChangedSignal(“Team”):Connect(function() but i’m not exactly sure how to use it in here since i’m not a scripter
local SpawnPart = workspace:WaitForChild("benefactorspawn")
local SpawnPart2 = workspace:WaitForChild("menuspawn")-- Set this to the part you want (Not a spawn part but a regular part)
local GroupID = 16221838 --Set this to your group id
game.Players.PlayerAdded:Connect(function(player)
if player:GetRankInGroup(GroupID) == 255 and player.Team.Name == "Combine" then
player.Character:MoveTo(SpawnPart.Position+Vector3.new(0,2.5,0))
player.CharacterAdded:Connect(function(char)
wait()
char:MoveTo(SpawnPart.Position+Vector3.new(0,2.5,0))
end)
elseif player:GetRankInGroup(GroupID) == 255 and player.Team.Name == "Menu" then
player.CharacterAdded:Connect(function(char)
wait()
char:MoveTo(SpawnPart2.Position+Vector3.new(0,2.5,0))
end)
end
end)