|
| 01 Jun 2016 07:10 AM |
I have a Gui which has a few buttons and clicking on one of them will change your team, and 2 seconds later, will kill you. What I am trying to do is, by killing you, I will make you spawn at the team spawn. I have configured the spawn for the team. Let's focus on the button that for example says red, the local script in it is. ***The team's color is really red.
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function() player.TeamColor = BrickColor.new("Really red") wait(2) player.Character.Head:remove() end)
So when I join the game, and press red, it changes my team and kills me. The problem is that sometimes when it kills me, I respawn at the neutral spawn.
#RAP Wot m8?
Wot m8? |
|
|
| Report Abuse |
|
|
Erediin
|
  |
| Joined: 13 Mar 2016 |
| Total Posts: 756 |
|
|
| 01 Jun 2016 07:24 AM |
i think killing them is a stupid way to do it, connect it to a remoteevent and have it :LoadCharacter()
|
|
|
| Report Abuse |
|
|
|
| 02 Jun 2016 12:09 AM |
| I tried it, but it didn't work out. It was like this: player:LoadCharacter() but still didn't work. |
|
|
| Report Abuse |
|
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 02 Jun 2016 02:30 AM |
Use :Destroy() instead of :remove()
To fix your problem, make no spawns neutral. |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 02 Jun 2016 02:37 AM |
player.Character:BreakJoints()
the power of the meme ( ͡° ͜ʖ ͡°) |
|
|
| Report Abuse |
|
|