I'm trying to make a stand like script, but when I run the command the player teleports to the NPC. I've tried many things but nothing is working, I'm not sure what I'm doing wrong.
Here's the script I'm using:
local Player = game.Players.LocalPlayer
local Char = Player.Character or Player.CharacterAdded:wait()
local NPC = game.ReplicatedStorage.NPC:Clone()
NPC.Parent = Char
local Weld = Instance.new("Weld", NPC.HumanoidRootPart)
Weld.Part0 = NPC.HumanoidRootPart
Weld.Part1 = Char.HumanoidRootPart
Weld.C1 = CFrame.new(0,10,0)

1 comment
The parent argument to Instance.new is deprecated, assign parent in another line. :wait() is deprecated, switch to :Wait()