local x = script.Parent:FindFirstChild("PointLight")
local function onMouseClick(Player)
print("Lamp is now on")
local x = script.Parent:FindFirstChild("PointLight")
if x.Enabled == false then
x.Enabled = true
end
end
x.MouseClick:connect(onMouseClick)
So I wanted this to make it to where when you clicked the lamp it would enable the pointlight inside the lamp. I ran into some errors it seems, if you could tell me what I did wrong I'd be really greatful. (This is my first time using click detectors and making scripts for them)
