I don't understand what is wrong here?

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

What are you trying to do with this line?

What do you think this line does?

1 Like

those rounded are humrp positions but rounded up

1 Like

it checks the humanoids position and if it is not = to then runs

1 Like