Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make tools that gives another tool?

Asked by 4 years ago
Edited 4 years ago

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
0
If its in a local script it wont work as its client side if its in a script it should work as it will be server side deth836231 142 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

You can also use this to uneqiup tools.

`Humanoid:UnequipTools()'

And

'Humanoid:EquipTool(ToolThatYouWantToEquip)'

to equip them.

Also use

'tool.Activated'

Instead.

0
a pure answer like this is against the rules, describe your answer so he can understand what happens Gameplayer365247v2 1055 — 4y
0
He should not even give a script in the first place goodadmins 111 — 4y
0
Probably not. Gameplay28 139 — 4y
Ad
Log in to vote
0
Answered by
BashGuy10 384 Moderation Voter
4 years ago

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)
0
Please don't spoonfeed code. It doesn't thoroughly explain your answer. DeceptiveCaster 3761 — 4y

Answer this question