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

Trying to weld an item to a player but it wont run anything and gives 0 errors, why?

Asked by 1 year ago

I just want to weld a basic part onto a player (the part already has a weld with all the proportions btw) but for some reason i cant see the part on the player and if i look in the Explorer its not parented either, can someone please help me out

local ServerStorage = game:GetService("ServerStorage")


wait()
local Release = ServerStorage:WaitForChild("SoulRelease")
local Clone = Release:Clone()
Clone.Weld.Part1 = script.Parent:WaitForChild("LeftArm")
Clone.Parent = script.Parent


Server Script in StarterCharacterScripts

1 answer

Log in to vote
0
Answered by 1 year ago
Edited 1 year ago

C0 and C1 could be the issue simply because they are used for offsets. Use a WeldConstraint instead because Part1 is always glued at Part0's. Therefore, LeftArm should be Part0 and Clone should be Part1. Don't forget to position Part1 to Part0.

If that still won't work, It's probably because your character is R15.

local ServerStorage = game:GetService("ServerStorage")
local Character = script.Parent

local Release = ServerStorage.SoulRelease
local Clone = Release:Clone()
Clone.Parent = Character
Clone.Weld:Destroy()

local weldConstraint = Instance.new("WeldConstraint", Character:FindFirstChild("LeftArm") or Character:FindFirstChild("Left Arm") or Character:FindFirstChild("LowerLeftArm"))
weldConstraint.Part0 = weldConstraint.Parent
weldConstraint.Part1 = Clone
Clone.Position = weldConstraint.Part0.Position
0
huh now i have an even weirder error, its properly assigning parent, but when i select myself in explorer my character model is REALLY long, and when i find the part in-game it seems to be sort of rocking back and forth diagonally, and yes, every part has canCollide off Black_Magic2533 104 — 1y
0
OH WAIT T3_MasterGamer 2189 — 1y
0
I forgot that WeldConstraint just keeps two parts at the same distance and not make them stick together. You need to position Clone to arm. T3_MasterGamer 2189 — 1y
Ad

Answer this question