So basically, i'm trying to make a basic swordfighting game with a kills for cash script, the cash script has one small problem, but my main problem is this script:
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function(click)
if player.leaderstats.Coins.Value >= 25 then
player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - 25
game.ReplicatedStorage.Tools.Firebrand:Clone().Parent = player:WaitForChild("Backpack")
game.ReplicatedStorage.Tools.Firebrand.SwordScript:Clone().Parent = player:WaitForChild("Backpack")
end
end)`
This script is supposed to clone a tool from my ReplicatedStorage Tools folder, but when it gives the sword, the sword doesn't swing or make the sound. It won't even deal damage. Can anyone help me fix this?
Note: i am really new to scripting, this is from a tutorial

1 comment
Is it in a LocalScript?