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

I have a scripting question?

My main goal is to have a brick change color whenever I click it. I don't know why, but my script or Roblox doesn't seem to work.

I am using a click detector which seems to work because whenever I hover over the brick a hand appears. I trying to do Alvin blox project here https://www.youtube.com/watch?v=yJglWQM0h5A.

here is my first script, I believe it is identical to the one in the video. It's a local script and is located under starterGui.

local clickdetector = game.Workspace.Part.ClickDetector clickdetector.MouseClick:Connect(function() game.Workspace.MyClickDetectorEvent.FireServer() end)

MyClickDetectorEvent is what the remote event is called

This next script is located under the RemoteEvent. here it is game.Workspace.MyClickDetectorEvent.OnServerEvent:Connect(function() script.Parent.Parent.Part.BrickColor = BrickColor.Random()

end)

if anyone knows of potential problems please let me know. thanks

4 comments

0

Do any errors appear in the output?

0

sorry never mind, there was an error. it said this 20:50:46.399 - Expected ':' not '.' calling member function FireServer.

0

solved it thanks so much benbebop. I didn't even realize that I could look in the output. I am a complete noob

0

Code Block.

1 answer

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