I am trying to make a script that adds a part on top of an existing part, but I am trying to access the Z value of the existing part, so I tried this
PartZ = game.Workspace.Part.Position.Vector3.Z print (PartZ)
Before that I tried this
PartZ = game.Workspace.Part.Position.Z print(PartZ)
None of them worked. If anyone could explain that to me it would be gr8 m8.
The first script would not work because of the 'Vector3', this is used when trying to set a Position value such as
game.Workspace.Part.Position = Vector3.new(X,Y,Z)
Your second attempt at this should work perfectly but I advise you make it
print(tostring(PartZ))
rather than
print(PartZ)
Just to make the value a string value (I know it is not required but it is a good habit to get into for numerical values)