So here is what I have: function checkforblock(x,y) if workspace:FindFirstChild(x) == nil then local ree = Instance.new("Part", workspace) ree.Name = (x) ree.Anchored = true if workspace:FindFirstChild(y) == nil then local Y = Instance.new("Part", workspace) Y.Name = (y) Y.Anchored = true end end end
function position(x, y, z, a) local newCFrame = CFrame.new(x, y, z) local object = (a) object.CFrame = newCFrame end
checkforblock("Redblock","blueCube") position(0, 5, 0, "Redblock")
My mess up is in the third line of the position function. It gives me the error of ("Error attempt to index local 'object' (a string value)") I can't figure out why, Could I have some help please.
the property of CFrame is Vector3 so it should be like Vector3.new()