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
 

Re: How To Get This Script To Work?

Previous Thread :: Next Thread 
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
19 Apr 2012 07:28 PM
local h = game.Players.LocalPlayer

function player()
if h.TeamColor == BrickColor.new("Bright blue") then
script.Parent.Active = false
script.Parent.Textcolor3.Color3 = (77/77/77)
else
script.Parent.Active = true
script.Parent.Textcolor3.Color3 = (255/255/255)
end
end

script.Parent.MouseButton1Down:connect(player)


It is suppose to make it so if you're on the bright blue team, then the button to switch your team to bright blue team, the letters are gray (not working), and the button is not suppose to work, but i don't see anything wrong with this script. It doesn't work at all.
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
19 Apr 2012 07:32 PM
What is with this "script.Parent.Active = false" ?
Report Abuse
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
19 Apr 2012 07:38 PM
To make it stop people from changing teams
Report Abuse
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
19 Apr 2012 07:43 PM
help,
b
u
m
p
Report Abuse
WhoBloxedWho is not online. WhoBloxedWho
Joined: 25 Mar 2009
Total Posts: 4611
19 Apr 2012 07:46 PM
function player()
if h.TeamColor == "Bright blue" then --Doesn't need the BrickColor part you had
script.Parent.Active = false
script.Parent.Textcolor3 = Color3.new(77,77,77)-- Use Color3.new(#,#,#)
else
script.Parent.Active = true
script.Parent.Textcolor3.Color3 = Color3.new(255,255,255,)-- Use Color3.new(#,#,#)
end
end

script.Parent.MouseButton1Down:connect(player)

Color 3 is weird, look on the wiki and find how to use it properly, I can't remember how.
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
19 Apr 2012 07:56 PM
Why not just do this?

local h = game.Players.LocalPlayer
local Active = nil

function player()
if h.TeamColor == "Bright blue" then
Active = false
script.Parent.Textcolor3.Color3 = (77,77,77)
else
Active = true
script.Parent.Textcolor3.Color3 = (255,255,255)
end
end

script.Parent.MouseButton1Down:connect(player)
Report Abuse
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
19 Apr 2012 08:06 PM
Doesn't work.
Report Abuse
0supadude0 is not online. 0supadude0
Joined: 11 Aug 2010
Total Posts: 649
19 Apr 2012 08:06 PM

function player()
if h.TeamColor == BrickColor.new("Bright blue") then
script.Parent.Active = false
script.Parent.TextColor3 = Color3.new(77/255,77/255,77/255,)
else
script.Parent.Active = true
script.Parent.TextColor3 = Color3.new(1,1,1)
end
end

script.Parent.MouseButton1Down:connect(player)


Try that.
Report Abuse
0supadude0 is not online. 0supadude0
Joined: 11 Aug 2010
Total Posts: 649
19 Apr 2012 08:09 PM
Sorry, I made a mistake
Use this one

local h = game.Players.LocalPlayer

script.Parent.MouseButton1Down:connect(function()
if h.TeamColor == BrickColor.new("Bright blue") then
script.Parent.Active = false
script.Parent.TextColor3 = Color3.new(77/255,77/255,77/255,)
else
script.Parent.Active = true
script.Parent.TextColor3 = Color3.new(1,1,1)
end
end)
Report Abuse
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
19 Apr 2012 08:18 PM
that doesn't work ether :(
Report Abuse
0supadude0 is not online. 0supadude0
Joined: 11 Aug 2010
Total Posts: 649
19 Apr 2012 08:22 PM
Oh haha sorry, I did the same thing again

script.Parent.TextColor3 = Color3.new(77/255,77/255,77/255)

Replace that line with the other
Report Abuse
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
19 Apr 2012 08:32 PM
The button changed color, but it still works when you press it, follow me so you can see
Report Abuse
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
19 Apr 2012 09:13 PM
help
Report Abuse
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
19 Apr 2012 09:58 PM
someone fix my script
Report Abuse
andymewborn is not online. andymewborn
Joined: 07 Oct 2008
Total Posts: 1112
19 Apr 2012 11:42 PM
local h = game.Players.LocalPlayer

function player()
if h.TeamColor == BrickColor.new("Bright blue") then
script.Parent.Active = false
script.Parent.TextColor3 = Color3.new(77/77/77)
else
script.Parent.Active = true
script.Parent.TextColor3 = Color3.new(255/255/255)
end
end

script.Parent.MouseButton1Down:connect(player)
Report Abuse
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
20 Apr 2012 07:13 AM
Thanks, i edited a little to work though, but it works :D


local h = game.Players.LocalPlayer

function player()
if h.TeamColor == BrickColor.new("Bright blue") then
script.Parent.Active = false
script.Parent.TextColor3 = Color3.new(77/250, 77/250, 77/250)
script.Parent.Teleport.Disabled = true
else
script.Parent.Active = true
script.Parent.TextColor3 = Color3.new(255/255, 255/255, 255/255)
script.Parent.Teleport.Disabled = false
end
end

script.Parent.MouseButton1Down:connect(player)
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