Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make tools that gives another tool?

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

1 comment

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

2 answers

You can also use this to uneqiup tools.

`Humanoid:UnequipTools()'

And

'Humanoid:EquipTool(ToolThatYouWantToEquip)'

to equip them.

Also use

'tool.Activated'

Instead.

3 comments

0

a pure answer like this is against the rules, describe your answer so he can understand what happens

0

He should not even give a script in the first place

0

Probably not.

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)

1 comment

0

Please don't spoonfeed code. It doesn't thoroughly explain your answer.

This discussion is preserved as it was. New answers, comments, and votes are closed.