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: Help! Group only spawn script.

Previous Thread :: Next Thread 
zaidRANGER is online. zaidRANGER
Joined: 03 Sep 2014
Total Posts: 2155
02 Jun 2016 04:07 AM
function waitForChild(parent, childName)
while true do
local child = parent:findFirstChild(childName)
if child then
return child
end
parent.ChildAdded:wait()
end
end

game.Players.PlayerAdded:connect(function(newPlayer)
if newPlayer:IsInGroup(2662724) then
newPlayer.TeamColor = BrickColor.new("Black")
else
newPlayer.TeamColor = BrickColor.new("Fossil")
end
while true do
char = newPlayer.Character
if char then
break
end
wait(1)
end
local humanoid = waitForChild(char, "Humanoid")
humanoid.Health = 0
end)

--What did i go wrong??


Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
02 Jun 2016 04:31 AM
game.Players.PlayerAdded:connect(function(Player)
if Player:IsInGroup(2662724) then
Player.TeamColor = BrickColor.new("Black")
else
Player.TeamColor = BrickColor.new("Fossil")
end
if Player.Character then
Player.Character:LoadCharacter()
end
end)


Report Abuse
The_Governator is not online. The_Governator
Joined: 02 Mar 2016
Total Posts: 254
02 Jun 2016 07:34 AM
why does nobody use output...
Report Abuse
MetaCoder is not online. MetaCoder
Joined: 16 Apr 2016
Total Posts: 52
02 Jun 2016 08:08 AM
@The_Governator Is there a need for it now?
Report Abuse
zaidRANGER is online. zaidRANGER
Joined: 03 Sep 2014
Total Posts: 2155
02 Jun 2016 10:51 AM
@Chim

Thanks a bunch mate, you're a life saver :D!


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