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: Color changeing Gui script.

Previous Thread :: Next Thread 
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
02 Jan 2013 06:09 PM
I need a script that when you click on the scirpts parent.
it makes a GUI in the same parent red.

i got this far.




function onButtonClicked()

end

script.Parent.MouseButton1Click:connect(onButtonClicked)
Report Abuse
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
02 Jan 2013 06:10 PM
function onButtonClicked()
local gui = script.Parent.Parent -- Or Whatsoever
gui.BackgroundColor3 = Color3.new(1, 0, 0)
end

script.Parent.MouseButton1Click:connect(onButtonClicked)

~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ 【▬】
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
02 Jan 2013 06:26 PM
thx
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
02 Jan 2013 06:36 PM
it dident work?


function onButtonClicked()
local gui = script.Parent.Parent.3
gui.BackgroundColor3 = Color3.new(255, 0, 0)
end

script.Parent.MouseButton1Click:connect(onButtonClicked)
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
02 Jan 2013 06:37 PM

it dident work?


function onButtonClicked()
local gui = script.Parent.Parent.3
gui.BackgroundColor3 = Color3.new(255/255, 0, 0) -- range from 0 to 1
end

script.Parent.MouseButton1Click:connect(onButtonClicked)



Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
02 Jan 2013 06:37 PM
local gui = script.Parent.Parent["3"]
gui.BackgroundColor3 = Color3.new(1, 0, 0)


> Penguin Power
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
02 Jan 2013 06:38 PM
Woops copied the whole message.
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
02 Jan 2013 06:44 PM
Why does the frist script work, but not the second one???


function onButtonClicked()
local gui = script.Parent.Parent["3"]
gui.BackgroundColor3 = Color3.new(0, 0,204)
end

script.Parent.MouseButton1Click:connect(onButtonClicked)




__________________






function onButtonClicked()
local gui = script.Parent.Parent["3"]
gui.BackgroundColor3 = Color3.new(255, 0, 0)
end

script.Parent.MouseButton1Click:connect(onButtonClicked)
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
02 Jan 2013 06:45 PM
function onButtonClicked()
local gui = script.Parent.Parent["3"]
gui.BackgroundColor3 = Color3.new(0, 0,204/255)
end

script.Parent.MouseButton1Click:connect(onButtonClicked)

and

function onButtonClicked()
local gui = script.Parent.Parent["3"]
gui.BackgroundColor3 = Color3.new(255/255, 0,0)
end

script.Parent.MouseButton1Click:connect(onButtonClicked)

As I said, range from 0 to 1
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