I have a little teleport effect with parts, and it is suppose to stop once it gets to a certain height but it doesn’t stop?
while isTeleporting == false do
wait()
if Vector3.new(RoundedX, RoundedY, RoundedZ) ~= Vector3.new(-22, CFrame.Y, -803) then
if clonedEffect2.Position ~= Vector3.new(character.Head.Position.X, 20, character.Head.Position.Z) then
clonedEffect.Position = clonedEffect.Position + Vector3.new(0, 0.1, 0)
clonedEffect2.Position = clonedEffect2.Position + Vector3.new(0, 0.1, 0)
elseif clonedEffect2.Position == Vector3.new(character.Head.Position.X, 20, character.Head.Position.Z) then
humrp.Position = Vector3.new(-22, 84, -803)
end
else
clonedEffect:Destroy()
clonedEffect2:Destroy()
isTeleporting = true
end
end