I am making a fashion show and I want it to be that if I kill someone they spawn at a specific spawnlocation. Is there a way/script that puts someone in a team when they die? Can anyone help me with this? (I am a beginner at Roblox studio)
You can either use teams to set someone's spawn when they die, or just teleport them when they respawn with CharacterAdded.
local function CharacterAddedFunction(character) local humanoidrootpart = character:WaitForChild("HumanoidRootPart") humanoidrootpart.CFrame = workspace.TargetSpawnPoint.CFrame end game.Players.PlayerAdded:Connect(function(player) local character = plr.Character if character then -- initial check CharacterAddedFunction(character) end plr.CharacterAdded:Connect(CharacterAddedFunction) end)
inside a local player (inside game.Players) there is a property called respawn location. You can set the object value to any brick.