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

How to I make only the y axis move?

I want only the y axis to move so that whnever i move the x and z axis it automatically goes up from there instead of being fixed

bodyPos = script.Parent 
Part = script.Parent.Parent
while wait() do
bodyPos.Position = Vector3.new(Part.Position,math.random(0,100),Part.Position)
end

1 answer

bodyPos = script.Parent 
Part = script.Parent.Parent
while wait() do
bodyPos.Position = Vector3.new(Part.Position.X,math.random(0,100),Part.Position.Z)
end

You forgot to add the X/Z values

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