Im trying to make something that a script in a a teleporter will only work when someone does a certain thing, then I tested, opened output, then found this error, can someone please help me out.
Script:
local part = script.Parent
if game.PurpleKey.ClickDetector.MouseClick:Connect(function(plr) keyModule.Clicked = true wait(1) part:remove()
if game.PurpleKey.ClickDetector.MouseClick:Connect(function(plr) keyModule.Clicked = false wait(1) part:add()
end
It was a simple syntax error
local part = script.Parent if game.PurpleKey.ClickDetector.MouseClick:Connect(function(plr) keyModule.Clicked = true wait(1) part:remove() if game.PurpleKey.ClickDetector.MouseClick:Connect(function(plr) keyModule.Clicked = false wait(1) part:add() end end