This has been occurring the past two days when applying updates to my game. I don’t fully recall how I had fixed it last time - so I just reverted it to the same spot. Which I’m quite certain is what I did in the first place that had “fixed it.” Even though it was essentially two shutdowns after the first - it was as if nothing had ever happened.
I tried to search for this on the devforum to see if anybody had any similar problems just to find nothing.
The furthest I got was noticing that it would kick you from the ToolsWeld script; which I was grateful to find out due to one of my testers being on standby.
After over 4 hours of attempting to fix this - I admit defeat. I honestly have no clue what else to do at this point.
ToolWelds Script:
local lastDone = {}
local tableInsert = table.insert
function Weld(x,y)
local W = Instance.new("Weld")
W.Part0 = x
W.Part1 = y
local CJ = CFrame.new(x.Position)
local C0 = x.CFrame:inverse()*CJ
local C1 = y.CFrame:inverse()*CJ
W.C0 = C0
W.C1 = C1
W.Parent = x
end
function Get(A, handle)
if handle then
if A:IsA("BasePart") then
Weld(handle, A)
A.Anchored = false
else
local C = A:GetChildren()
for i=1, #C do
Get(C[i], handle)
end
end
end
end
game.ReplicatedStorage.Events.ToolWelds.OnServerEvent:connect(function(player, gun, equipped, rCFrame, lCFrame)
pcall(function()
if not gun.Handle:FindFirstChild("Weld") then
Get(gun, gun:FindFirstChild("Handle"))
end
if equipped then
local arms = {player.Character:FindFirstChild("Right Arm"),player.Character:FindFirstChild("Left Arm")}
if arms ~= nil then
local m6d = {player.Character.Torso:FindFirstChild("Right Shoulder"),player.Character.Torso:FindFirstChild("Left Shoulder")}
if not lCFrame then
table.remove(m6d, 2)
end
if not rCFrame then
table.remove(m6d, 1)
end
for _,v in pairs(m6d) do
v.Part1 = nil
end
local weld
local weld1
if not player.Character:FindFirstChild("RWeld") then
weld = Instance.new("Weld")
weld.Part0 = player.Character.Head
weld.Name = "RWeld"
weld.Parent = player.Character
else
weld = player.Character:FindFirstChild("RWeld")
end
if rCFrame then
weld.Part1 = arms[1]
weld.C1 = rCFrame
end
if not player.Character:FindFirstChild("LWeld") then
weld1 = Instance.new("Weld")
weld1.Part0 = player.Character.Head
weld1.Name = "LWeld"
weld1.Parent = player.Character
else
weld1 = player.Character:FindFirstChild("LWeld")
end
if lCFrame then
weld1.Part1 = arms[2]
weld1.C1 = lCFrame
end
end
else
if player.Character then
if player.Character:FindFirstChild("LWeld") then
player.Character.LWeld.Part1 = nil
end
if player.Character:FindFirstChild("RWeld") then
player.Character.RWeld.Part1 = nil
end
if player.Character:FindFirstChild("Torso") then
if player.Character.Torso:FindFirstChild("Right Shoulder") and player.Character:FindFirstChild("Right Arm") then
player.Character.Torso["Right Shoulder"].Part1 = player.Character["Right Arm"]
end
if player.Character.Torso:FindFirstChild("Left Shoulder") and player.Character:FindFirstChild("Left Arm") then
player.Character.Torso["Left Shoulder"].Part1 = player.Character["Left Arm"]
end
end
end
end
end)
end)