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

I'm trying to make a puzzle door open, help?

Asked by 4 years ago

Basically im trying to make a little puzzle game about a dream, however my script isnt working. I want to make it so when all parts glow the door will open, here is my attempt:

if game.Workspace.Puzzle1.MG.PointLight.Brightness == 40 and game.Workspace.Puzzle1.MG1.PointLight.Brightness == 40 and game.Workspace.Puzzle1.MG2.PointLight.Brightness == 40 and game.Workspace.Puzzle1.MG3.PointLight.Brightness == 40 then do game.Workspace.Puzzle1.DoorA.Transparency = 1 end

0
Remove the "do". DeceptiveCaster 3761 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Remove you "do" also It just makes you door invisible so here is a little better one. I have not tested it but seems ok. Also avoid using == as that is absolute try < or >. Cause sometimes roblox do .0001 stuff.

if game.Workspace.Puzzle1.MG.PointLight.Brightness == 40 and game.Workspace.Puzzle1.MG1.PointLight.Brightness == 40 and game.Workspace.Puzzle1.MG2.PointLight.Brightness == 40 and game.Workspace.Puzzle1.MG3.PointLight.Brightness == 40 then
game.Workspace.Puzzle1.DoorA.Transparency = 1 
game.Workspace.Puzzle1.DoorA.CanCollide = false
end
Ad

Answer this question