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 |
|
|
|
| 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
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
| |
|
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
|
  |
| 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 |
|
|
|
| 02 Jan 2013 06:37 PM |
local gui = script.Parent.Parent["3"] gui.BackgroundColor3 = Color3.new(1, 0, 0)
> Penguin Power |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 02 Jan 2013 06:38 PM |
| Woops copied the whole message. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|