Edit: Nevermind, it wasn’t committing my script changes for some reason, it works
hello, I have this script
local target = script.Parent.Parent
local humanoid = target:FindFirstChild("Humanoid")
print(humanoid.Parent.Name)
humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
print("Speed change detected")
local debuffActive = humanoid:FindFirstChild("HitByCannon")
if debuffActive and humanoid.WalkSpeed > 4 then
if debuffActive.Value == true then
humanoid.WalkSpeed = 4
print("Speed changed")
end
end
end)
The only thing that gets printed is the name of the player, but none of the things in the function ever print, even when the humanoid speed is changed. I am fairly sure I have written it correctly. Is this the correct way to check for walkspeed changes when the humanoid is under a debuff? Thanks