I am working on an easter game, and when you click on an egg, it is supposed to change a value to true, and then a door is supposed to open. Nothing happens when clicked and no errors. Here is the door's code.
local WaterEggCollected = game.Workspace.Values.WaterEggCollected.Value
local Door1 = game.Workspace.Door1
while true do
if WaterEggCollected == true then
Door1.Transparency = 1
Door1.CanCollide = false
end
end
Here is the egg code.
function OnClicked (mouse)
script.Parent:Destroy()
game.Workspace.Values.WaterEggCollected.Value = true
end
script.Parent.ClickDetector.MouseClick:connect(OnClicked)
