Tool doesnt function in main game, even though it works perfectly in server testing in studio

What are the reasons why something might work in the test button on roblox studio, but not in the actual game?
My sword wont activate in the actual roblox game(1stpicture) but will in testing with a local server(2nd picture)
and there are no error messages.
Here is the code:

local cooldown = false
script.Parent.Activated:Connect(function()
    if cooldown == false then
        local Stamina = script:FindFirstAncestorOfClass("Model").Stats.Stamina

        local c1 = script.Parent.Combos.Combo1
        local c2 = script.Parent.Combos.Combo2
        local c3 = script.Parent.Combos.Combo3
        local combo = script.Parent.CurrentCombo

        print(combo.Value,cooldown,Stamina.Value)
                if combo.Value == 3 and cooldown == false and Stamina.Value >= 6 then
                --do the thing
                elseif combo.Value == 2 and cooldown == false and Stamina.Value >= 5 then
                --do the other thing
                elseif combo.Value == 1 and cooldown == false and Stamina.Value >= 4 then
                --do the third thing
                end
    end
end)

Screenshot 2023-06-04 184338
Screenshot 2023-06-04 184018