Ok, I would of done this myself, but.. I don't know how to get into the player, so I can teleport him and kill him, heres the script.....
01 | RoundStart = game.Workspace.RoundStart |
02 | RoundInProgress = game.Workspace.RoundInProgress |
03 | RoundEnd = game.Workspace.RoundEnd |
04 | PlayerSpawn = game.Workspace.PlayerSpawn |
05 |
06 | while wait() do |
07 | wait( 1 ) |
08 | if RoundStart.Value = = true and RoundInProgress.Value = = false then |
09 |
10 |
11 | --Ment to teleport the player to "PlayerSpawn.Position" |
12 |
13 |
14 | elseif RoundEnd.Value = = true and RoundInProgress.Value = = true then |
15 |
Teleportation article on ROBLOX wiki
As for killing a player:
1 | -- assuming player is a variable that points to a player |
2 | if player.Character and player.Character:FindFirstChild( "Humanoid" ) then |
3 | player.Character.Humanoid.Health = 0 |
4 | end |
If you were scripting a weapon to deal only a certain amount of damage, you could use TakeDamage(), but that function doesn't damage through a forcefield because it's intended to stop spawnkilling. In your case, you probably want to kill the player no matter what.