This error appears:

Unable to cast array to Coordinate.

When I try to set the primaryPartCFrame of a cloned model . Heres the code:

local items = game:GetService('ReplicatedStorage').Items

game:GetService('ReplicatedStorage').Brickmote.OnServerEvent:Connect(function(player, itemName, location)
	local itemTemplate = items:FindFirstChild(itemName)
	if (itemTemplate) then
		local item = itemTemplate:Clone()
		item.Parent = workspace.Base.ItemHolder
		
		item:SetPrimaryPartCFrame(location)
	end
end)

6 comments

0

Where is the FireServer part?

0

in a localscript

0

No duh. Post the bit where you call the method.

0

I can assure you its not a fireserver problem. Thats a stupid statement. The error obviously says its something about positioning.

0

Don't say it's stupid since it's not. Post that bit I said, it should be a problem there.

0

You passed the location as a parameter, so you must have sent an array instead of a CFrame.