so when i buy a tool from shop my tools damage script wont run.
my damage script:
local tool = script.Parent
local Damage = 7
local debouce = false
local Holding = false
tool.Equipped:Connect(function()
Holding=true
end)
tool.Unequipped:Connect(function()
Holding=false
end)
tool:WaitForChild("blade").Touched:Connect (function (hit)
if hit.Parent:FindFirstChild("Humanoid") and debouce == false and Holding == true then
debouce = true
hit.Parent.Humanoid:TakeDamage(Damage)
wait(.5)
debouce = false
end
end)
my shop script:
local player = game.Players.LocalPlayer
local Saber = game.ReplicatedStorage.Weapons["Sith Saber"]
script.Parent.MouseButton1Down:Connect(function()
if player.leaderstats.Cash.Value >= 40 then
player.leaderstats.Cash.Value = player.leaderstats.Cash.value - 40
Saber:Clone().Parent = player:WaitForChild("Backpack")
end
end)

2 comments
You would need to clone the tool to the player's backpack on the server and not the client (LocalScript).
can u show me what that would look like