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: Help me PLEASE with Change Team GUI...

Previous Thread :: Next Thread 
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 11:23 AM
I am trying to get one to work and it won't!

I have been trying all day!

You Have the button then inside 2 scripts.

One named "Kill" The other named "TC"

I am trying to get it to work for 3 teams. It is supposed to kill you and you respawn on that spawn point. For me 1 team it changes but I do not die. And the other it creates a team named "Neutral"

PLEASE HELP ME!
Report Abuse
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
07 Jan 2013 11:31 AM
local team = game.Teams["TeamName"]
script.Parent.MouseButton1Click:connect(function ()
player.TeamColor = team.TeamColor
end
end)

Put this in a button.
Report Abuse
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 11:35 AM
Will that kill the person and change there team?
Report Abuse
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
07 Jan 2013 11:37 AM
Forgot the kill part.
local team = game.Teams["TeamName"]
script.Parent.MouseButton1Click:connect(function ()
player.TeamColor = team.TeamColor
player.Character.Humanoid.Health = 0
end
end)
Report Abuse
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 11:41 AM
Ok, I got 2 questions.

1. Is that all in 1 script? Normal or a local script?

2. Do I need to replace "Teamcolor" with the color? or just leave it.

Thanks for replying btw, you really have helped.
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
07 Jan 2013 11:45 AM
geret, you also forgot to assign a value for player??
Report Abuse
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
07 Jan 2013 11:46 AM
1| Normal. Local, doesn't matter much.

2| The thing at the top, just edit TeamName into your team name.
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
07 Jan 2013 11:46 AM
Also, wizardry, you replace TeamName with the name of the team you want them to be on.
Report Abuse
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
07 Jan 2013 11:47 AM
Kinda still sleeping :P

local player = game.Players.LocalPlayer
local team = game.Teams["TeamName"]
script.Parent.MouseButton1Click:connect(function ()
player.TeamColor = team.TeamColor
player.Character.Humanoid.Health = 0
end
end)


-----------Now it must be local.
Report Abuse
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 11:48 AM
Alright Thanks Guys!!! I really do appreciate it, will try it now!
Report Abuse
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 11:54 AM
Doesn't work?! D:
Report Abuse
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 12:34 PM
Please any other ways?
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
07 Jan 2013 12:56 PM
You used that script using a LocalScript?
Report Abuse
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 01:30 PM
Yes?
Report Abuse
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 01:32 PM
I am not sure as I am shocking at scripting BUT I think I know where it goes wrong...

local player = game.Players.LocalPlayer
local team = game.Teams["Raiders"]
script.Parent.MouseButton1Click:connect(function ()
player.TeamColor = team.TeamColor
player.Character.Humanoid.Health = 0
end
end)


Where it says:
player.TeamColor = team.TeamColor

I think it needs something in there because I am not sure how it knows what team your changing too...

Report Abuse
xWiZARDRYx is not online. xWiZARDRYx
Joined: 08 Dec 2012
Total Posts: 87
07 Jan 2013 02:13 PM
Anyone?
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
07 Jan 2013 02:26 PM
local player = game.Players.LocalPlayer
local team = game.Teams["Raiders"]
script.Parent.MouseButton1Click:connect(function()
player.TeamColor = team.TeamColor
player.Character.Humanoid.Health = 0
end)
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