So I am trying to move a model so that it spawns directly in-front, but a little ahead, of the player in-game. But my last few attempts at this have failed. I have used CFrame and MoveTo(), and CFrame works best, though I cannot get it working correctly, as the model doesn't always appear in-front of the player.
I'm not an expert on this but I have been able to accomplish by using the lookvector of the player's humanoidrootpart's CFrame. Here is the code:
local plr = game:GetService("Players"):WaitForChild("vissequ") while wait(4) do local model = script:WaitForChild("Model"):Clone() model:SetPrimaryPartCFrame(plr.Character.HumanoidRootPart.CFrame + plr.Character.HumanoidRootPart.CFrame.LookVector * 12) model.Parent = game.Workspace end
This of course assumes the model is a child of the script. As you can see all it does is sets the location of the models primary part equal to the players location + 12 studs in front of that player (using lookvector *12).
This of course will not control the way the model is orientated, but you could do the same type of thing if you desired to control the model's orientation and not just its position.
Somebody else could probably give a better explanation, but I tested that out and it works per your request.