I want the variable x to be equal to the current x position of part
part=script.Parent
x=part.Position
That gives me x,y and z but i just need the x How would i make it so x= the current x position of the part.
I want the variable x to be equal to the current x position of part
part=script.Parent
x=part.Position
That gives me x,y and z but i just need the x How would i make it so x= the current x position of the part.
Position has its own X, Y, and Z sub-properties. Therefore you can just write,
local x = script.Parent.Position.X
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
well now i feel dum, ty
Also remember you aren't referencing the property, you're storing it. So whenever you make changes, it will only impact the variable itself, not the property of the object itself.