I don't know what to do and i'm just asking what's wrong with this script so i can fix it. (Don't tell me the perfect solution just give me the comment of what's wrong so i can learn and fix it.)
this is what i did so far
tool.Activated:Connect(function() game.Lighting.Revolver:clone().Parent = player.Backpack wait(0.1) script.Parent:Remove() end
You can also use this to uneqiup tools.
`Humanoid:UnequipTools()'
And
'Humanoid:EquipTool(ToolThatYouWantToEquip)'
to equip them.
Also use
'tool.Activated'
Instead.
Hi there, i'm BashGuy10. I have a simple script you can adjust to your needs!
local tool = script.Parent local player = game:GetService("Players").LocalPlayer -- Get the player tool.Equipped:connect(function(mouse) -- "mouse" Is used for then next function print("Tool equipped!") mouse.Button1Down:connect(function() -- Now this is where the magic happens print("Mouse pressed!") local tool2 = game.Lighting.Tool -- Your tool name tool2:Clone().Parent = player.Backpack wait(0.5) tool:Destroy() end) end)