How to make model follow player?

Hello, I want to make it so this model I have in the game with follow the player when they say david three times. Everything works apart from the model following the player. The model is in ServerStorage and the script is in ServerScriptService. In the script where it says “if DavidsPart.Touched:Wait() then” is where i’m struggling to make the model follow the player. Here is the script:

local Players = game:GetService("Players")

local player = Players.LocalPlayer

local DavidsPart = game.Workspace["David'sPart"]

game.Players.PlayerAdded:Connect(function(player) -
	player.Chatted:Connect(function(msg) 
		if msg == "david, david, david" then 
			if DavidsPart.Touched:Wait() then
			 -- This where the model is suppose to follow the player.
			end
		end
	end)
end)

Maybe of these could help -

1 Like

is the model an actual humanoid object, or just a model?

It’s a humanoid object. It’s in server storage

you could make it offset by a few studs with the player’s humanoidrootpart

example:

Model:MoveTo(player.Character.HumanoidRootPart.Position * Vector3.new(-3,-4,-1))

(moveto moves the entire model)

1 Like

okay well then, I would recommend what @IConsumeCheddar sent, as that will work.