Hi everyone, thank you for clicking on my thread ![]()
So I’m trying to make a value decrease whenever I hit a part named “Neck” with swords, and the value doesn’t seem to decrease at all. I get no error in the output, and I have no idea why this is happening. It’s in a local script.
local leftBlade = Character["LeftHand"]:waitForChild("Blade")
local rightBlade = Character["RightHand"]:waitForChild("Blade")
local BladesLeft = script.Config.BladesLeft
local bladesTotal = leftBlade or rightBlade
bladesTotal.Touched:Connect(function(hit)
if hit.Name == "Neck" then
BladesLeft.Value = BladesLeft.Value - 1
end
end)
Any help would be greatly appreciated, thanks ![]()