Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Gui Script Help?

Asked by 8 years ago
function Click()
local b = game.Workpsace.Block
    b.BrickColor = BrickColor.Red()
end
script.Parent.MouseButton1Click:connect(Click)

Help please with this script!!!

2 answers

Log in to vote
0
Answered by 8 years ago

On line 2, you spelled workspace wrong.

Also, you used the function to change brick color wrong

Your script should look like this,

function Click()
local b = game.Workspace.Block
    b.BrickColor = BrickColor.new("Really red")
end
script.Parent.MouseButton1Click:connect(Click)

Or, possibly,

function Click()
local b = game.Workspace.Block
    b.BrickColor.Red()--Might not work
end
script.Parent.MouseButton1Click:connect(Click)

The first should work, the second is a guess.

Good Luck!

0
BrickColor.Red() works. It is stated on the wiki and works in the commandline. Link150 1355 — 8y
Ad
Log in to vote
0
Answered by
Spoookd 32
8 years ago

You are Using BrickColor.red() You have to get a new brickcolor so you use BrickColor.new("Red")

0
This is false. BrickColor.Red() also works. See: http://wiki.roblox.com/index.php?title=BrickColor. Link150 1355 — 8y
0
Oh I never knew that. My bad, hehe. Spoookd 32 — 8y

Answer this question