I'm trying to make a script that will "holster" a fake version of a weapon, welding it to their body when they unequip it. I can't "get" the character to establish a weld. Does anyone have a solution for this?
tool = script.Parent real = tool.Handle fake = real:Clone() backpack = tool.Parent player = backpack.Parent name = player.Name character = -- player character? attachpoint = character:FindFirstChild("LowerTorso") fake.Parent = character fake.Position = attachpoint.Position fake.Orientation = attachpoint.Orientation weld = Instance.new("Weld") weld.Part0 = attachpoint weld.Part1 = fake
Thank you in advance.
weld = Instance.new("Weld") weld.Parent = game.Players.Localplayer.Character weld.Part0 = attachpoint weld.Part1 = fake
or if you would rather the parenting to not be as that you can change it as
weld = Instance.new("Weld",game.Players.Localplayer.Character)
That should work.