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