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: Please Help With Change Team GUI

Previous Thread :: Next Thread 
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 03:43 AM
Hi guys,

I need help with my gui on my place. So, I need a "change team GUI" for my group base. This allows with a click of a button to change team. I cannot get it working, I have 3 teams (Raiders, allies and K.A.R) But only Raiders and allies work? When I click on K.A.R it will kill me, but not change spawn or team? Please help me as fast as possible. Thanks
Report Abuse
Colbie988 is not online. Colbie988
Joined: 03 Mar 2012
Total Posts: 885
07 Jan 2013 07:04 AM
Mind posting the script here so I could check it?
Report Abuse
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 07:12 AM
Sure!

THIS IS FOR THE RAIDERS (MAGENTA COLOUR)

Group ID:

function Click(mouse)
if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(131688) then
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Magenta")
end
end

script.Parent.MouseButton1Click:connect(Click)


Kill:

function onButtonClicked()
script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health = 0
end

script.Parent.MouseButton1Click:connect(onButtonClicked)
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
07 Jan 2013 07:43 AM
Try removing the 'Mouse' inside the function. The Kill script doesn't appear to need it... (No garuntees)
Report Abuse
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 07:58 AM
Ok, It still doesn't work. Without the 'Mouse' it isn't clickable. Thanks anyways!
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
07 Jan 2013 08:14 AM
I've checked the one that I use, that works fine, then yours, and the only difference I can find is the ID, Color, and pathways. Try checking to make sure you don't have too many/not enough '.Parents' in the script.

Here's mine if you wanna have a look:

function Click(mouse)
if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(ID) then
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Color")
end
end

script.Parent.MouseButton1Click:connect(Click)
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
07 Jan 2013 08:15 AM
Actually, nevermind. Mine doesn't seem to work anymore... ¬_¬
Report Abuse
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 08:17 AM
Aha Ok, thanks for the tips ;)
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
07 Jan 2013 08:19 AM
I'll tell you once i've figured it out. :P
Report Abuse
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 08:22 AM
Ok thanks, I am still trying now ;)
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
07 Jan 2013 08:25 AM
Got it, you need to put it in a 'LocalScript' instead of just a 'Script'

Report Abuse
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 08:36 AM
Really?! Please can you explain that to me, i am a noob at this...
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
07 Jan 2013 08:54 AM
Okay, if you select the Parent of where you want the script to be, then look around the top bar for an 'Insert' button. Click on it, then click 'Object'.
A whole bunch of different things will pop up, Parts, Values, Scripts, etc... Look around for a 'LocalScript'. It's like a normal script, just with a little head poking out, click on it, then click Ok.

You've inserted a LocalScript. ^-^
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
07 Jan 2013 09:44 AM
Can you describe the hierarchy?
Report Abuse
Colbie988 is not online. Colbie988
Joined: 03 Mar 2012
Total Posts: 885
07 Jan 2013 04:29 PM
Woops sorry, u replied so long that I fell to sleep. Not seriously...
Btw Scripts are scripts which are accessable to all players in one game while LocalScripts are accesible by one player in one game meaning all players have them but others cannot see.

Scripts= Public
Local= Personal > Usually for GUIs.

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