So I am trying to make it so an NPC character will be constantly teleported in front of a player. This script should work as far as I'm aware. In a seperate script, a part is welded to the player, tpPart or PartToWeld, and the NPC should be constantly being teleported to the part. The script gives no errors and "did" is printed repeatedly. This script is a local script, I put it inside a local script so the player could only see their NPC and no one else's. Any ideas?
while true do
wait()
print("did")
local player = game.Players.LocalPlayer
local man = game.Workspace.NPC:Clone()
local tpPart = player.Character.PartToWeld
man:SetPrimaryPartCFrame(tpPart.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(180), math.rad(0)))
end
