Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

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

Log in to vote
0
Answered by
Norbunny 555 Moderation Voter
5 years ago
Edited 5 years ago

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
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 SuperBeeperman 30 — 5y
0
There you go, edited to the thing you need. And it shouldn't lag, it's just roblox's servers today. Norbunny 555 — 5y
Ad

Answer this question