I have a welding script inside multiple tools in my game. Here's the script:
local t = script.Parent
local h = t.Handle
local e = {}
for i,v in pairs(t:GetChildren()) do
if v:IsA("BasePart") then
local w = Instance.new("Weld", game.JointsService)
w.C1 = v.CFrame:toObjectSpace(h.CFrame)
w.Part0 = h
w.Part1 = v
table.insert(e, w:Clone())
end
end
script.Parent.Equipped:connect(function()
for i,v in pairs(e) do
v:Clone().Parent = game.JointsService
end
end)
The problem is that, after a player resets and the tools are immediately given to the player, the script doesn't function properly. Here's a video example in my game:
https://www.youtube.com/watch?v=qEmX_D0Wr34
So, can anyone explain why it's not functioning right?
