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 » Scripting Helpers
Home Search
 

How do I make it so this script won't work...

Previous Thread :: Next Thread 
SuperMarioIsAwesome is not online. SuperMarioIsAwesome
Joined: 12 Apr 2010
Total Posts: 16966
02 Sep 2013 11:15 AM
...if the player is on the Black team?

function Click(mouse)
if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(945312) then
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Bright yellow")
end
end

script.Parent.MouseButton1Click:connect(Click)
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
02 Sep 2013 11:17 AM
function Click(mouse)
if mouse.TeamColor == "Black" then
if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(945312) then
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Bright yellow")
end
end
end

script.Parent.MouseButton1Click:connect(Click)

I'm not sure that's what you want but if you click it and you're on black team you'll get put on yellow team if you're in the group you specified.
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
02 Sep 2013 11:17 AM
check if the player is on that team and if he is then dont run it
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
02 Sep 2013 11:18 AM
Oh I get it now you don't want black team to do it, okay this is the script you want:

function Click(mouse)
if mouse.TeamColor ~= "Black" then
if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(945312) then
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Bright yellow")
end
end
end

script.Parent.MouseButton1Click:connect(Click)
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
02 Sep 2013 11:23 AM
function Click(mousex, mousey)
if script.Parent.Parent.Parent.Parent.Parent.TeamColor.Name ~= "Black" then
if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(945312) then
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Bright yellow")
end
end
end
script.Parent.MouseButton1Click:connect(Click)
Report Abuse
SuperMarioIsAwesome is not online. SuperMarioIsAwesome
Joined: 12 Apr 2010
Total Posts: 16966
02 Sep 2013 01:27 PM
thanks
Report Abuse
SuperMarioIsAwesome is not online. SuperMarioIsAwesome
Joined: 12 Apr 2010
Total Posts: 16966
02 Sep 2013 01:46 PM
it doesn't work
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
02 Sep 2013 01:58 PM
function Click(mouse)
if mouse.TeamColor ~= "Black" then
if mouse:IsInGroup(945312) then
mouse.TeamColor = BrickColor.new("Bright yellow")
end
end
end

script.Parent.MouseButton1Click:connect(Click)

that should work
Report Abuse
SuperMarioIsAwesome is not online. SuperMarioIsAwesome
Joined: 12 Apr 2010
Total Posts: 16966
02 Sep 2013 02:19 PM
thanks it works but i changed it to this

function Click(mouse)
mouse = script.Parent.Parent.Parent.Parent.Parent
if mouse.TeamColor ~= "Black" then
if mouse:IsInGroup(945312) then
mouse.TeamColor = BrickColor.new("Bright yellow")
end
end
end

script.Parent.MouseButton1Click:connect(Click)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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