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 me with my script please.

Previous Thread :: Next Thread 
YogamingHenshaw is not online. YogamingHenshaw
Joined: 08 Mar 2015
Total Posts: 45
23 Nov 2017 04:00 PM
I have made a script that saves the Number of players in a team into an IntValue. This script works.

game.Teams["Flyweight"].PlayerAdded:connect(function(player)
game.Workspace:WaitForChild("Flyweight NumPlayers").Value = game.Workspace:WaitForChild("Flyweight NumPlayers").Value + 1

But when I try to remove the player when they have left it says 'PlayerRemoving is not a valid member of Team' the broken area of the script is below.

game.Teams["Flyweight"].PlayerRemoving:connect(function(player)
game.Workspace:WaitForChild("Flyweight NumPlayers").Value = game.Workspace:WaitForChild("Flyweight NumPlayers").Value - 1
end)

Please help.


Report Abuse
chaust is not online. chaust
Joined: 05 Jul 2011
Total Posts: 175
23 Nov 2017 04:08 PM
PlayerRemoving is not a function of teams its a function of players.
Report Abuse
YogamingHenshaw is not online. YogamingHenshaw
Joined: 08 Mar 2015
Total Posts: 45
24 Nov 2017 01:16 AM
what would I do to fix this?


Report Abuse
PuffoThePufferfish is online. PuffoThePufferfish
Joined: 19 Jan 2013
Total Posts: 362
24 Nov 2017 01:26 AM
when someone leaves you check their team










Report Abuse
YogamingHenshaw is not online. YogamingHenshaw
Joined: 08 Mar 2015
Total Posts: 45
24 Nov 2017 09:51 AM
How would I do that?


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