|
| 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
|
  |
| 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 |
|
|
|
| 07 Jan 2013 11:35 AM |
| Will that kill the person and change there team? |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 07 Jan 2013 11:45 AM |
| geret, you also forgot to assign a value for player?? |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 07 Jan 2013 11:48 AM |
| Alright Thanks Guys!!! I really do appreciate it, will try it now! |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 07 Jan 2013 12:56 PM |
| You used that script using a LocalScript? |
|
|
| Report Abuse |
|
|
| |
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|