HeyDevs i got a proplem when i press on equip and item appear on the backpack the items stops from working even when i click too much to get it work and thats a photos for a btools example
and this is the script i used for equip button:
local toolName = "ItemName"
local replicatedStorage = game.ReplicatedStorage
local tool = replicatedStorage.Items:FindFirstChild(toolName)
script.Parent.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
local backpack = player:FindFirstChild("Backpack")
if not backpack then
warn("no beckpeck")
return
end
if script.Parent.Text == "Equip" then
if tool then
local equippedTool = tool:Clone()
equippedTool.Parent = backpack
script.Parent.Text = "Unequip"
else
warn("tool isnt in rep storage")
end
elseif script.Parent.Text == "Unequip" then
local existingTool = backpack:FindFirstChild(toolName)
if existingTool then
existingTool:Destroy()
script.Parent.Text = "Equip"
end
end
end)
like pankii said, where is your double quotation?
annihilate that you should get used to using output.
View → Output. it dumps errors, warnings, prints very useful.
also if the tool has a server script I don’t know if it will replicate if your doing this on a client script, so you may want to create a remote event telling the server what item to give to who and fire it from the client.
But hey that’s a assumption, playtest and see what works.
The problem is pretty much in the scripts inside the tools as there is no errors/bugs in your script, I would suggest modifying the scripts inside to make them start/work when you equip the tool.
maybe its a good idea + my scripter friend said that the tools are not working cuz i dont have the permmision to them and i need to republish it to work idk if he was right abt what he saying …