Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does the brick disappear?

Asked by 9 years ago

I'm making a light switch, and it's supposed to change where it goes each click.

But it keeps disappearing. Plus, I don't know how to make it where you click it again it goes back.

script.Parent.MouseClick:connect(function()
    game.Workspace.Light.PointLight.Enabled = true
    script.Parent.Parent.CFrame = CFrame.new(52.52, 4.515, 48.18)
    script.Parent.Parent.Rotation = Vector3.new(-90, 32.667, -90)
    script.Parent.Parent.CFrame = CFrame.new(52.52, 4.515, 48.18)
end)

Answer this question