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: Simple script help

Previous Thread :: Next Thread 
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
22 Feb 2017 06:02 AM
game.Teams["Playing"]:GetPlayers():connect(function(playing)
playing:WaitForChild("Humanoid").Died:connect(function()
print("boi")
end)
end)



Not sure why it doesn't work
Report Abuse
ryanzlion is not online. ryanzlion
Joined: 27 May 2012
Total Posts: 65
22 Feb 2017 06:17 AM

for i, v in pairs(game.Teams['Playing']:GetPlayers() do
v.Character:WaitForChild('Humanoid').Died:connect(function()
print('boi')
end)
end
Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
22 Feb 2017 07:03 AM
doesn't work
Report Abuse
ryanzlion is not online. ryanzlion
Joined: 27 May 2012
Total Posts: 65
22 Feb 2017 07:05 AM
What does it print?
Report Abuse
ryanzlion is not online. ryanzlion
Joined: 27 May 2012
Total Posts: 65
22 Feb 2017 07:05 AM
o add a ) at ### end of :GetPlayers()
Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
22 Feb 2017 07:07 AM
Yea I did, it just does nothing and prints nothing rip
Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
22 Feb 2017 07:14 AM
Nevermind I figured it out
Report Abuse
MICHEAL1988351 is online. MICHEAL1988351
Joined: 26 Jan 2015
Total Posts: 582
22 Feb 2017 07:14 AM
--try this
local tbl = {};
for i,v in pairs(game.Players:GetChildren()) do
if v.TeamColor == game.Teams["Playing"].TeamColor then
tbl[v.Name];
tbl[v.Name] = v.Character:FindFirstChild("Humanoid").Died:connect(function()
print("boi");
tbl[v.Name]:disconnect();
end)
end
end
wait(4);
for i,v in pairs(tbl) do
v = nil;
end
Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
22 Feb 2017 07:16 AM
I just made a really rookie mistake (im a newbie scripter)

forgot to add a wait, so the script ran before the player loaded in smhhhhhhhh
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