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: Team Swap Broken? Help?

Previous Thread :: Next Thread 
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
19 Mar 2013 06:53 PM
I know the Hierarchy is right with plr, it's in a very in-depth Gui, but for some reason Output says nothing but when I click it doesn't switch the teams.


plr = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent
team = game.Teams:findFirstChild("Allies")
function onButtonClicked()
plr.TeamColor = team.TeamColor
end
script.Parent.MouseButton1Down:connect(onButtonClicked)
Report Abuse
dekkonot is not online. dekkonot
Joined: 22 Dec 2010
Total Posts: 6685
19 Mar 2013 06:57 PM
Quick question. Why didn't you use a local script?

Oh, and, reported for spam.
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
19 Mar 2013 06:59 PM
"reported for spam" how is this counted as "spam"?
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
19 Mar 2013 07:01 PM
That would be his signature.
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
19 Mar 2013 07:02 PM
So any ideas of how to fix this?
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
19 Mar 2013 07:07 PM
...
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
19 Mar 2013 07:11 PM
Anyone?
Report Abuse
animatedRobloxwinner is not online. animatedRobloxwinner
Joined: 28 Apr 2012
Total Posts: 997
19 Mar 2013 07:13 PM
This should be in a local script, how would we know what player it's set to?
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
19 Mar 2013 07:15 PM
Wait so I don't change the text but paste it into a local script?
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
19 Mar 2013 07:29 PM
Why does no one ever reply to these?
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
19 Mar 2013 07:45 PM
        local Player = Game.Players.LocalPlayer
        local Team = Game.Teams["Allies"]

        script.Parent.MouseButton1Down:connect(function()
            Player.TeamColor = Team.TeamColor
        end)

Put this in a LocalScript.
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
19 Mar 2013 08:28 PM
Still doesn't work.
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