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: Doesn't work?

Previous Thread :: Next Thread 
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
26 Nov 2015 10:13 PM
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:wait()
local hum = char:WaitForChild'Humanoid'
local team1 = game.Teams.Red
local team2 = game.Teams.Blue
debounce = false

hum.Died:connect(function()
if debounce == false then
debounce = true
if _G.GameMode == 'Elimination' then
player.TeamColor = BrickColor.new('White')
elseif _G.GameMode == 'Team Swap'then
print'team swapppp'
if player.TeamColor.Name == team1.Name then
print'switching teams'
player.TeamColor = BrickColor.new(team2.Name)
elseif player.TeamColor.Name == team2.Name then
print'switching teams'
player.TeamColor = BrickColor.new(team1.Name)
end
end
end
end)

Output:
team swapppp

Doesn't change teams?
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
26 Nov 2015 10:17 PM
b
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
26 Nov 2015 10:26 PM
b
Report Abuse
sonicboy01 is not online. sonicboy01
Joined: 22 Nov 2008
Total Posts: 923
26 Nov 2015 10:29 PM
Should I say that after or before the print you haven't even set the new team? Lol.
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
27 Nov 2015 03:05 PM
It prints 'team swapppp' if the guy died and the gamemode is 'Team Swap' then is prints the 'switching teams' under the two if statements
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