Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can you weld a NPC to a player?

Asked by 5 years ago

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)
0
The parent argument to Instance.new is deprecated, assign parent in another line. :wait() is deprecated, switch to :Wait() User#19524 175 — 5y

Answer this question