It's mainly for a smoke gui that changes a smoke parent in a brick in workspace?
function onMouseDown1() wait(2) script.Parent.Parent.Parent.Workspace.Part.Smoke.Color = game.Startergui.smokec.frame.colors["really red"].value
I dont know what's wrong ;(
Okay, your missing connection line, and your color needs to be a color3 value, and a lot of this is screwed up in general.
script.Parent.MouseButton1Down:connect(function() wait(2) game.Workspace.Part.Smoke.Color = BrickColor.new("Really red").Color end)
Case matters in the names of things.
It's StarterGui
not Startergui
, Value
not value
.
Also, the script.Parent.Parent.Parent.Workspace...
is bad. Don't do that! Like script
, you have the reference Workspace
already.
Workspace.Part.Smoke.Color =
is sufficient and sensitive to fewer things and therefore better!.
Since you've made that mistake your other objects names might not match this capitalization. Standard ROBLOX practice is to capitalize all words in object names, so they really ought to be SmokeC, Frame, Colors, etc.
I'm assuming you simply didn't copy the connection of this script and end of this function?
-- Assign the button to a variable named "Button" Button.MouseButton1Down:connect(function(X, Y) wait(2) script.Parent.Parent.Parent.Workspace.Part.Smoke.Color = game.StarterGui.smokec.frame.colors["really red"].Value end)
Just so you know, "smoke" is spelled wrong
When I write this, I'm assuming the part is the parent of the script, and the other part is not the part with the script in it.
script.Parent.MouseClick:connect(function() wait(2) script.Parent.Parent.Parent.Workspace.Part.Smoke.Color = Color3.new(255,0,0) end)
To change it back, change the color3.
script.Parent.MouseButton1Down:connect(function() game.Workspace.Part.Smoke.Color = "" --Color there game.Players.LocalPlayer.PlayerGui.Smokec.Frame --Setting Here end)