All i want to do a script that get Parent positions (XYZ) and subtract it by a variable. Here's the script and error:
Script:
local PositionGoal = {-301.103, 153.029, -497.664}
local PositionStart = {script.Parent.Position}
local XPosition = PositionGoal[1]
local YPosition = PositionGoal[2]
local ZPosition = PositionGoal[3]
local XGoal = PositionStart[1]
local YGoal = PositionStart[2]
local ZGoal = PositionStart[3]
local MOVEMENT_GOAL = {(XPosition - XGoal), (YPosition - YGoal), (ZPosition - ZGoal)}
Error:
"Workspace.Part.Script:13: bad argument #1 to '?' (Vector3 expected, got number)"
From what i understand, it says that the operation is being expected from vector3. How can i fix that?

2 comments
You're trying to subtract a number by a Vector3 value. You can only perform arithmetic operations on a Vector3 value with another Vector3 value and in some cases a CFrame value too. Read more here: https://developer.roblox.com/api-reference/datatype/Vector3
Thanks.