Ok so i have this script and for some reason it doesn't teleport to it's position ;/
My attempt
game.ReplicatedStorage:WaitForChild("js").OnServerEvent:Connect(function(plr,pos) local r = game.ServerStorage.npc:Clone() r.Parent = workspace workspace:WaitForChild(r).UpperTorso.CFrame = pos end)
Here's what happens Client send's a cframe value in remote Servers clones the npc and parents it to workspace server positions it to the pos -- This is where my error is at it wont position it ;/
Change line 4 at this:
r.UpperTorso.CFrame = CFrame.new(pos)
So if you are using CFrame, you have to return a CFrame value and not a position value. CFrame.new changes a position into a CFrame.
Also, if you want to move the entire ncp, you have to change his HumanoidRootPart's CFrame and not his UpperTorso's CFrame:
r.HumanoidRootPart.CFrame = CFrame.new(pos)
Note: you don't need to get the cloned npc again from the workspace, just use his variable. Hope this helped!