Im Making a door that locks behind its self for a period of time.. Im trying to do this using int. Value!
script.Parent.ClickDetector.MouseClick:connect(function()
if game.Workspace.Value >= 10 then
game.Workspace.Value = 11
else
script.Parent.Parent.Door1.Transparency = 1
script.Parent.Parent.Part1.Transparency = 1
wait(1)
script.Parent.Parent.Door2.Transparency = 1
script.Parent.Parent.Part2.Transparency = 1
wait(2)
script.Parent.Parent.Door2.Transparency = 0
script.Parent.Parent.Part2.Transparency = 0
wait(1)
script.Parent.Parent.Door1.Transparency = 0
script.Parent.Parent.Part1.Transparency = 0
game.Workspace.Value = 11
end
end)
Out Put:
--Workspace.Model.Button.Script:2: attempt to compare number with userdata
