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 » Scripters
Home Search
 

Re: Needing help with team change GUI

Previous Thread :: Next Thread 
nospacebuildrobot is not online. nospacebuildrobot
Joined: 05 Nov 2013
Total Posts: 393
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 is not online. 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
nospacebuildrobot is not online. nospacebuildrobot
Joined: 05 Nov 2013
Total Posts: 393
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
nospacebuildrobot is not online. nospacebuildrobot
Joined: 05 Nov 2013
Total Posts: 393
02 Jun 2016 12:10 AM
Bump
Report Abuse
vlekje513 is not online. 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 is not online. Isosta
Joined: 10 May 2015
Total Posts: 14729
02 Jun 2016 02:37 AM
player.Character:BreakJoints()


the power of the meme ( ͡° ͜ʖ ͡°)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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