Okay, I'll get straight to the point. I want my script to change the boolvalue to true once the button is pressed and I don't really know how to do that, I'm sort-of new to scripting.
local screen = script.Parent.Parent.Screen
local light = script.Parent.Parent.Light.SurfaceLight
local IsOn = script.Parent.IsOn.Value
IsOn = true
script.Parent.ClickDetector.MouseClick:Connect(function()
if IsOn then
IsOn=false
light.Enabled = false
screen.BrickColor = BrickColor.Black()
screen.Material = Enum.Material.SmoothPlastic
elseif not IsOn then
IsOn=true
light.Enabled = true
screen.BrickColor = BrickColor.Blue()
screen.Material = Enum.Material.Neon
end
end)

1 comment
Thanks