Paint the World Currency System

I’m making a Paint the World game, and I’m trying to make sure that wars in this game are fair, so the amount of money it costs to invade something is the equation 10xz. Is there a way to calculate this?

So far I’ve tried to find the vector size of X using this script:

print(script.Parent.Vector3.zAxis.Value)

It ended in an error. Vector3 is not a valid member of UnionOperation “Workspace.Folder.Folder.Union”
Is there a way to fix this? I will add this code to the paint bucket, checking the zAxis size * xAxis size * 10, then deducting that money (if possible)

Vector3 is not a property that any parts/unions have. Use Part.Size.(Axis) with axis being replaced by either X, Y, or Z.

2 Likes

I’d suggest doing something like this:
size = [Part].Size --gets part size, replace [Part] with whatever part is needed
cost = (size.X+size.Z)*10 --gets cost of part based on size
print(cost)

1 Like