generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Need help!

Previous Thread :: Next Thread 
NickyJ3 is not online. 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 is not online. 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 is not online. 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
UnRandomizing is not online. UnRandomizing
Joined: 20 Jun 2012
Total Posts: 1490
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 is not online. NickyJ3
Joined: 23 Dec 2011
Total Posts: 3563
10 Apr 2017 07:28 PM
Thank you both!

~Storm~
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image