game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
repeat wait() until plr.Character:FindFirstChild("Humanoid")
while wait() do
if char:FindFirstChild("ForceField") then
for _,c in pairs(plr.Backpack:GetChildren()) do
local bp = c:Clone()
c:Destroy()
bp.Parent = plr.PlayerGui.tools
end
else
for _,v in pairs(plr.PlayerGui.tools:GetChildren()) do
local pb = v:Clone()
v:Destroy()
pb.Parent = plr.Backpack
end
end
end
char.Humanoid.Died:connect(function()
for _,c in pairs(plr.Backpack:GetChildren()) do
local bbp = c:Clone()
c:Destroy()
bbp.Parent = plr.PlayerGui.tools
end
end)
end)
end)
--Broken, it spams after u reset.
I made this script, basically what it does is: if you are inside a forcefield, it clones the items from ur inv, puts them in a folder and the deletes the one in ur inventory. if you are outside the forcefield then it puts your items back in ur inv and deletes them from the folder.
The problem is: it works perfectly until you reset/die, once you die and respawn the script starts to spam the items in your inventory like this: https://gyazo.com/59e1b824d31b546f92898e3e789514e2

1 comment
HEY THATS BEEN HAPPENING TO ME TO!! NO WAY!! I NEED THIS ANSWERED TOO. I will try to get your question noticed