Making a simple click detector move Vector3 script and the "=" on the 6th line is under lined red. when I hover my mouse over it " Expected 'then' ,got '=' " pops up. how do I solve this.
door=script.Parent
turn=1
function move()
wait(0.1)
if turn = 1 the do
door.Position = door.Position + Vector3.new(0,-1,1)
door.Rotation = door.Rotation + Vector3.new(90,0,0)
turn = 0
end
end
if turn = 0 then do
door.Position = door.Position + Vector3.new(0,1,-1)
door.Rotation = door.Rotation + Vector3.new(-90,0,0)
turn = 1
end
end
end
door.ClickDetector.MouseClick:connect(move)

1 comment
Thank you. Not scripted for a while and this skipped my mind.