Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to move an object across X & Z angles while keeping the Y angle locked in one position?

I've been working for a few days now but I can't seem to find a reliable way to make an unanchored object hover in the same Y axis while being able to move its X and Z axis. Or something that works like a weld but also works when one part is anchored. Any ideas?

1 answer

Hi there,

You can try and use a loop to make sure that it stays always in the Y value you want to! I believe that some bodymovers can do so, but can also still be influenced by the player.

while true do
	part.Position = Vector3.new(part.Position.X,YValue,part.Position.Z)
	wait()
end

2 comments

0

Thank! But i need to keep it on the same position, not orientation. (i think that was what BodyGyro did) and when i tried the script, it kind of like lagged https://gyazo.com/de446ffd68f00b2838201de06e68bdad

0

There you go, edited to the thing you need. And it shouldn't lag, it's just roblox's servers today.

This discussion is preserved as it was. New answers, comments, and votes are closed.