So Im makeing a game called SkyWars and well the BreakTool works whenever you test it in studio... but it dose't when you save and play the actuial game.
This has happened to me alot... not just in this game.
well heres the script inside my BreakTool.
bin = script.Parent local pack = bin.Parent local player = pack.Parent function onButton1Down(mouse) local hit = mouse.Target if (hit == nil) then return end if (hit.Block ~= nil) then -- dont worry about all this. hit.Block dose exist (Theres a value called Block in hit) local block = game.Lighting.PlaceBlock:Clone() -- or about all this block.Parent = game.Players.LocalPlayer.Backpack -- or this block.Name = ""..hit.Name.."" -- or this. It works. hit:remove() end end function onSelected(mouse) print("Action Tool Selected") mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end bin.Selected:connect(onSelected)
Thanks for reading!