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

How to change position of a part according to current position?

I am making a weight lifting item and I need to move the weight in a a specific motion. The problem is I don't know how to code it. I was think

script.Parent.Position = script.Parent.Position + --Don't know what to put here

1 answer

✓ Accepted answer

Positions require Vector3 values. To change your Position relative to it's previous, maintain the current format used, and implement the Vector3.new() function near your addition operator

local Part = script.Parent
Part.Position = (Part.Position + Vector3.new(x,y,z))

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