for some reason, this script doesn't seem to work when i play it on mobile or just play it published. It only works in studio. Does anyone know how to correct it and make this script function outside of studio and published? Thanks!


local plr = game.Players.LocalPlayer
local ShopTools = plr.Backpack:WaitForChild("BoughtTools"):GetChildren()
for i,v in pairs(ShopTools) do
    local clone = v:Clone()
    clone.Parent = plr.Backpack
end

3 comments

0

Formatted code

0

what exactly do you mean by formatted code?

0

He means he formatted your code for you so we can read it easier. FYI, usually the sort of bug you're describing has to do with the script accessing something before it's ready. An error message would be very valuable for this. Press F9 for the developer console while in online mode. Any errors?