So I am making my own round-based game. The problem is that if a player dies, they can't go back to the map.
I thought of making a LocalScript tell the server that the player has respawned and teleport them to the map but I have no clue if that is going to work, considering if the LocalScript knows there is a map or not.
Instead I could have a RemoteFunction that tells the client if there is a map or not, then the client can ask the server to teleport them. But I'm not sure if that is going to work to.
This seems like a simple question but I'm not able to come up with ideas.
Edit: I thought of a new idea to use SpawnLocations, but I've used them in the past and they are a little hard to work with.
Add Folder into the map then add Parts and Name them SpawnTeamNumber
local Players = game.Players:GetChildren() local Map = workspace:WaitForChild(“Map”) -- Change this to the name of ur map local Spawns = Map:WaitForChild(“Spawns”) Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function() local Spawn = math.random(1,Amount of Spawn) Player.Character.HumanoidRootPart.CFrame = Spawns[“Spawn”.. Player.Team.Name ..Spawn].CFrame end) end)