I've never worked with models before, just parts. So I'm trying to make a model spawn in front of my character, however I keep getting this error message. It's the only way I know to make a block spawn based off character position

game.ReplicatedStorage.Universal.OnServerEvent:Connect(function(player, message)
	if message == "M1" then
		print("Message recieved")
		local V1 = game.ServerStorage:WaitForChild("Pillar")
		local V1C = V1:Clone()
		local char = player.character
		
		V1C:SetPrimaryPartCFrame(V1C:GetPrimaryPartCFrame() * CFrame.new(0,0,0))
		V1C.Parent = workspace
		V1C.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0,0,-4)
			
		
	end
end)

3 comments

0

Do you know which lined you get this error on?

0

On line 10.

0

Correct me if im wrong, Line 8 is useless since there is no offset created and it retains its original CFrame. Also, Models do not own a CFrame property. You can use MoveTo() or :SetPrimaryPartCFrame() if it has a PrimaryPart