NickyJ3
|
  |
| Joined: 23 Dec 2011 |
| Total Posts: 3563 |
|
|
| 10 Apr 2017 07:13 PM |
function OnEntered(player) if player:GetRankInGroup(550299) >= 1 then player.TeamColor = game.Teams["ERA"].TeamColor end end game.Players.PlayerAdded:connect(OnEntered)
Can anyone make this script respawn the player ONLY IF they are on the ERA team and do so WITHOUT KILLING THE PLAYER?
~Storm~ |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 10 Apr 2017 07:20 PM |
You cannot respawn without killing the player, for that you'd need some kind of custom health script, evaluate when it hits zero or below.
:LoadCharacter() works wonderfully, and you could subtract 1 from the death stat if it happens to affect it. |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 10 Apr 2017 07:20 PM |
| *evaluate when it hits zero or below and then teleport them back to the "spawn" |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2017 07:22 PM |
game.Players.PlayerAdded:connect(function() if player:IsInGroup(550299) then player.Team = game.Teams.ERA player:LoadCharacter() end end) |
|
|
| Report Abuse |
|
|
NickyJ3
|
  |
| Joined: 23 Dec 2011 |
| Total Posts: 3563 |
|
| |
|