Skip to content

Commit

Permalink
Fixed refresh (again)
Browse files Browse the repository at this point in the history
And yes it correctly orders tools now.
  • Loading branch information
Sceleratis committed May 14, 2021
1 parent 8767495 commit fb6e29c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
15 changes: 8 additions & 7 deletions MainModule/Server/Commands/Moderators.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions MainModule/Server/Shared/Changelog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit fb6e29c

Please sign in to comment.