Need help with moving a model next to a player

Hello Devfourm, I am trying to make a command that spawns a golf cart next to you. Im pretty sure I got the cart to spawn. But I am confused on how to move it.

Script:

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
	player.Chatted:Connect(function(msg)
		if msg == "!spawn cart" then
			if player:IsInGroup(10968280) then                    
				if player:GetRankInGroup(10968280) >= 240 then
					print("cart has spawned")
					local clone = game.ReplicatedStorage.GolfCart:Clone()
					clone.Parent = workspace
					clone.CFrame = player.Character.HumanoidRootPart.CFrame + Vector3.new (5, 0, 0)
				else
					print("sorry u cant spawn cart noob")
				end
			else
				print("player is not in group!")
			end
		end
	end)
end)

Ingame Devlogs: Screen Shot 2021-07-27 at 1.01.49 PM

Golf Cart Model: Screen Shot 2021-07-27 at 12.54.48 PM

Where the script is located: Screen Shot 2021-07-27 at 12.56.37 PM

Thanks, Kazok

1 Like

The model itself doesnt have a CFrame. Use :MoveTo() instead of CFrame or you can do clone.Body.insert whatever the main part is here

1 Like

um everything is not. thats the problem. can you help me fix it somehow?

do: clone:MoveTo(player.Character.HumanoidRootPart.Position)