i have a script for a clicky brick thats supposed to change a BoolValue and im not sure why it isnt working but i still am quite a noob so im not sure
local s = script.Parent local val = workspace.GameData.Close function setval() s.Color = BrickColor.new("Lime green") val.Value = true wait(0.5) s.Color = BrickColor.new("Really red") end s.CD.MouseClick:Connect(setval)
-- Server Script local Part = script.Parent -- Part where the ClickDetector is local ClickDetector = Part.ClickDetector -- Our click ClickDetector local val = workspace.GameData.Close -- Our closed check ClickDetector.MouseClick:Connect(function() Part.BrickColor = BrickColor.new("Lime green") -- Sets to lime green val.Value = true -- Sets the val to true wait(.5) -- .5 delay Part.BrickColor = BrickColor.new("Really red") -- Sets to really red end)
Hope this works.