Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

For some reason this change color whit click detector don't work (?)

Ok there is a error on "=" i don't know what to put

function onClicked(playerWhoClicked)
	local=workspace.script.parent
	workspace.bloq.BrickColor = BrickColor.random()
	wait(0.5)
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

1 answer

✓ Accepted answer

You forgot to add a variable after local

function onClicked(playerWhoClicked)
    local var =workspace.script.parent -- workspace.script.Parent might not work
    workspace.bloq.BrickColor = BrickColor.random()
    wait(0.5)
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

1 comment

0

Thanks, im new in this :>

This discussion is preserved as it was. New answers, comments, and votes are closed.