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: Help

Previous Thread :: Next Thread 
lilblitz56 is not online. lilblitz56
Joined: 06 Nov 2010
Total Posts: 461
27 Nov 2015 04:46 PM
I'm trying to make a script to where 2 buttons show up whenever a player's team changes to "Really red" and then go invisible whenever it's turned to a different team. There's no errors but the guis don't become visible :(

game.StarterGui.ResetPlayerGuiOnSpawn = false

local Player = script.Parent.Parent.Parent

Player.Changed:connect(function(Property)
if Property == "TeamColor" and Player.TeamColor == BrickColor.new"Really red" then
for _,x in pairs(script.Parent:GetChildren()) do
if x.ClassName ~= "Script" then
x.Visible = true
end
end
else
for _,x in pairs(script.Parent:GetChildren()) do
if x.ClassName ~= "Script" then
x.Visible = false
end
end
end
end)
Report Abuse
lilblitz56 is not online. lilblitz56
Joined: 06 Nov 2010
Total Posts: 461
27 Nov 2015 05:08 PM
Bump
Report Abuse
lilblitz56 is not online. lilblitz56
Joined: 06 Nov 2010
Total Posts: 461
27 Nov 2015 05:33 PM
Bump
Report Abuse
lilblitz56 is not online. lilblitz56
Joined: 06 Nov 2010
Total Posts: 461
27 Nov 2015 05:41 PM
BBump
Report Abuse
wonderful72pike is online. wonderful72pike
Joined: 13 Jul 2010
Total Posts: 7009
27 Nov 2015 05:43 PM
game.StarterGui.ResetPlayerGuiOnSpawn = false

local Player = script.Parent.Parent.Parent

Player.Changed:connect(function(Property)
if Property == "TeamColor" and Player.TeamColor == BrickColor.new"Really red" then
print("They're on the Really red team!")
for _,x in pairs(script.Parent:GetChildren()) do
if x.ClassName ~= "Script" then
x.Visible = true
end
end
else
print("Nope, they're on the "..Player.TeamColor.." team")
for _,x in pairs(script.Parent:GetChildren()) do
if x.ClassName ~= "Script" then
x.Visible = false
end
end
end
end)
==========================
Run this script instead and check the Output.
Report Abuse
WentLimited is online. WentLimited
Joined: 20 Sep 2012
Total Posts: 4511
27 Nov 2015 05:45 PM
Bump skipe
Report Abuse
WentLimited is online. WentLimited
Joined: 20 Sep 2012
Total Posts: 4511
27 Nov 2015 05:50 PM
Players.WentLimited.PlayerGUI.DJTeleportation.Script: 12: attempt to concatenate field 'TeamColor' (a userdata value)

line 12 has a problem
Report Abuse
WentLimited is online. WentLimited
Joined: 20 Sep 2012
Total Posts: 4511
27 Nov 2015 05:51 PM
nvm lmao i fixed it
Report Abuse
wonderful72pike is online. wonderful72pike
Joined: 13 Jul 2010
Total Posts: 7009
27 Nov 2015 05:52 PM
Lol that error was my fault, whoopsies
Report Abuse
WentLimited is online. WentLimited
Joined: 20 Sep 2012
Total Posts: 4511
27 Nov 2015 05:53 PM
Also it doesnt work. Still doesnt show up
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