What is the difference(s) between “argument” and “parameter”
A parameter is like a variable or placeholder you use to define that a value needs to be passed
local function f(parameter)
end
-- you can pass any value to the function, the passed value
-- will be the argument you supplied
Okay, I have a question
workspace.part.CFrame = workspace.part2.CFrame.LookVector*2
11:54:40.044 - Workspace.Script:1: bad argument #3 (CFrame expected, got Vector3)
It says 3rd argument was badly used. What are the 1st, 2nd and 3rd arguments?
You meant to do something like
local C = workspace.part.CFrame
workspace.part.CFrame = CFrame.new(C.LookVector*2)
A LookVector is a Vector3, not a CFrame.
Actually I know the mistake I did and I know how to solve it. I want you to find the arguments.
Here the argument you passed was the Vector3, by doing part.CFrame = ...
you’re basically overwriting its current CFrame property.
Well okay. What were the 1st, 2nd arguments?
The error is related to instances being userdata with metatables and metamethods within, the error was thrown because the third argument for __newindex, the Vector3 you passed cannot be used as a CFrame directly.
In your case as you’re using it, there’s only one argument which is the Vector3.