when I click on the brick it does nothing. don't be amazed if there's a lot of errors I'm new.
local door = game.Workspace.door local boi = false local goldy = game.Workspace.gold local sound = script.Parent.Parent:WaitForChild("Shock (A)") local click = game.Workspace.gold.ClickDetector click.MaxActivationDistance = 20 script.Parent.MouseClick:Connect(function() print("clicked") sound:Play() door.Transparency = 0.5 door.CanCollide = false end
Because... Sense you are using a :Connect(function(). You need to add a ) at the end of the "end" so your script should be like this:
local door = game.Workspace.door local boi = false local goldy = game.Workspace.gold local sound = script.Parent.Parent:WaitForChild("Shock (A)") local click = game.Workspace.gold.ClickDetector click.MaxActivationDistance = 20 script.Parent.MouseClick:Connect(function() print("clicked") sound:Play() door.Transparency = 0.5 door.CanCollide = false end)