From fb6e29cb340a9b57caab7122654162fba33a41a2 Mon Sep 17 00:00:00 2001 From: Sceleratis Date: Fri, 14 May 2021 17:42:06 -0400 Subject: [PATCH] Fixed refresh (again) And yes it correctly orders tools now. --- MainModule/Server/Commands/Moderators.lua | 15 ++++++++------- MainModule/Server/Shared/Changelog.lua | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/MainModule/Server/Commands/Moderators.lua b/MainModule/Server/Commands/Moderators.lua index b1ee2e744b..58bb4c7492 100644 --- a/MainModule/Server/Commands/Moderators.lua +++ b/MainModule/Server/Commands/Moderators.lua @@ -3467,16 +3467,16 @@ return function(Vargs, env) if pBackpack then oTools = {}; + + if oHumanoid then + oHumanoid:UnequipTools() + end pBackpack.ChildAdded:Connect(function(c) table.insert(oTools, c); c.Parent = nil; end) - if oHumanoid then - oHumanoid:UnequipTools() - end - for i,c in next,pBackpack:GetChildren() do table.insert(oTools, c); c.Parent = nil; @@ -3516,10 +3516,11 @@ return function(Vargs, env) end --// Bring previous tools back - if pBackpack and oTools then - pBackpack:ClearAllChildren(); + local newBackpack = p:FindFirstChildOfClass("Backpack") + if newBackpack and oTools then + newBackpack:ClearAllChildren(); for i,t in next,oTools do - t.Parent = pBackpack; + t.Parent = newBackpack; end end end diff --git a/MainModule/Server/Shared/Changelog.lua b/MainModule/Server/Shared/Changelog.lua index 1c847108fe..0cf4c9a77b 100644 --- a/MainModule/Server/Shared/Changelog.lua +++ b/MainModule/Server/Shared/Changelog.lua @@ -4,6 +4,7 @@ return { ""; "[v218.2 (HOTFIX) 5.14.2021 17:29 EST]"; "* Disabled the 'Events stopped' crash due to issues with the Windows store version of Roblox when minimized"; + "* Fixed :refresh (again)"; ""; "[v218.1 (HOTFIX) 5.14.2021 14:52 EST]"; "* Rewrote :refresh";