Hi!
This code is supposed to delete a player's sword when the player gets a kill, but it only works in studio and not in a server/local server. It is in a local script that is in the sword and I have tested the script that counts the player's kills and the IntValue does go up when I get a kill, but never deletes the sword.
game.Players.LocalPlayer.HiddenStats.Kills.Changed:Connect(function()
script.Parent:Destroy() -- this is a test and has no use
end)
Thank you for reading!
