0
votes

I've been working on a game on Roblox and right now Im trying to make it so that the character's Torso or HumanoidRootPart is welded to the spawn part that ive placed on the map.

character:FindFirstChild("Torso").CFrame = asp[1].CFrame

I keep getting this error though:

Bad argument #3 (CFrame expected, got Object)

Does anyone have any idea what it means and how to fix it? I've looked through all the forums I could find and none of it helped.

1
This is not the line which generates the error. - Egor Skriptunoff
@EgorSkriptunoff Actually it could be if asp[1] is an object with a child named "CFrame" which would leave this code referencing the child instead of the property - Taazar
@Taazar - So, what is the function which 3-rd argument is mentioned in the error message? - Egor Skriptunoff
@EgorSkriptunoff Whoops, forgot to notice that part - Taazar

1 Answers

0
votes

The first value of the array asp don't store an array. It should be like this :

local array = {key = CFrame3.new(0,5,0)}