so i was made a sword case, and a part and welded the 2 parts together, the script bellow, I was trying to weld the model of the two parts above to the players torso, not sure why it doesn’t work, specifically the Torso part
game.Players.PlayerAdded:Connect(function(Player)
local rs = game:GetService("ReplicatedStorage")
local Equip = rs:WaitForChild("SwordEquip")
local Character = Player.Character
Equip.OnServerEvent:Connect(function(Player)
local part = rs:WaitForChild("SwordCaseComplete")
local partA = part:Clone()
print("this even work?2")
local partB = Character:WaitForChild("Torso")
partA.Position = partB.Position
partA.Parent = Player.Character
print("this even work3")
local weld = Instance.new("WeldConstraint")
weld.Part0 = partA
weld.Part1 = partB
weld.Parent = partA
end)
end)
local rs = game:GetService("ReplicatedStorage")
local equip = rs:WaitForChild("SwordEquip")
player.CharacterAdded:Connect(function(character)
equip.OnServerEvent:Connect(function(player)
local part = rs:WaitForChild("SwordCaseComplete")
local partA = part:Clone()
local partB = character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso") -- check r15
if not partB then
warn("Torso or UpperTorso not found!")
return
end
partA.Parent = character
partA.Position = partB.Position
-- ensure both parts are parented before welding
local weld = Instance.new("WeldConstraint")
weld.Part0 = partA.PrimaryPart or partA:FindFirstChild("Basic_Handle") or partA
weld.Part1 = partB
weld.Parent = partA
end)
end)
end)
i tested it while not moving and it doesn’t work still, basically its spawning in a set position and then welding, reason why there’s so many in the image is because I was changing my position before using equip