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 » Scripting Helpers
Home Search
 

Re: Change team script not working.

Previous Thread :: Next Thread 
thesims2and3 is not online. thesims2and3
Joined: 13 Jun 2009
Total Posts: 140
10 Aug 2012 04:15 AM
I'm starting to be a little crazy because I can't get this to do anything, before i could make it change one person to Pastel Brown, now i can't do it with anyone (No output)

function Changeteam()
local pl = game.Players:GetChildren()
for i=1, #pl do
pl.TeamColor = BrickColor.new("Pastel brown")
Report Abuse
Brofessions is not online. Brofessions
Joined: 30 Jul 2012
Total Posts: 214
10 Aug 2012 04:48 AM
assuming you didn't post the entire script...


function Changeteam()
local pl = game.Players:GetChildren()
for i=1, #pl do
pl[i].TeamColor = BrickColor.new("Pastel brown")
Report Abuse
thesims2and3 is not online. thesims2and3
Joined: 13 Jun 2009
Total Posts: 140
10 Aug 2012 04:50 AM
I have tried that once and it didn't work, but i guess i'm going to try again.
Report Abuse
thesims2and3 is not online. thesims2and3
Joined: 13 Jun 2009
Total Posts: 140
10 Aug 2012 04:53 AM
An yes, this is just a function from my script. so i have something to trigger it.
Report Abuse
nickbricknick464 is not online. nickbricknick464
Joined: 22 Aug 2008
Total Posts: 8302
10 Aug 2012 04:59 AM
function Changeteam()
local pl = game.Players:GetChildren()
for i=1, #pl do
pl[i].TeamColor = BrickColor.new("Pastel brown")
end
end

;3
Report Abuse
Gyration is not online. Gyration
Joined: 06 Aug 2012
Total Posts: 9
10 Aug 2012 05:00 AM
> nickbricknick464

The ends were kind of assumed.
Report Abuse
thesims2and3 is not online. thesims2and3
Joined: 13 Jun 2009
Total Posts: 140
10 Aug 2012 05:01 AM
Thanks, until now it works in Solo, like it did last time i tried.
Report Abuse
nuclearguy00 is not online. nuclearguy00
Joined: 06 Apr 2010
Total Posts: 26
10 Aug 2012 05:22 AM
A function does not run until its called.

function changeteam() -- starts the function.
(content here)
end
changeteam() -- calls the function.


Thats why a onTouched function always has
script.parent.Touched:connect(onTouched)

Else that function doesnt run.
Report Abuse
thesims2and3 is not online. thesims2and3
Joined: 13 Jun 2009
Total Posts: 140
10 Aug 2012 05:28 AM
I also said as nr. 4 or something, that i have some thing to call it, this is just a FUNCTION from my script
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
10 Aug 2012 06:27 AM
Are you sure it's being called?

Print something in the function so you know that it is so.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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