Third parameter of MuteSpeaker not working?

I’ve made a simple command for my admin system to mute players and for some reason when trying to mute a player for a set duration (ex. 30 seconds) the player is permanently muted and is never unmuted. The duration parameter is in seconds (doesnt include the actual ‘seconds’ in it, only the number value) so I don’t understand why it’s not muting for the specified duration. Any help is appreciated!

chatService:GetChannel(“All”):MuteSpeaker(target, reason, duration)

Can we see more of the script? Its hard to tell what’s wrong just from that one line of code. Permanent mute occurs when 0, or no input is sent in the duration parameter. The problem is somewhere before this line of script.

This is how duration time is calculated. Even if I manually set the duration as 30 without calculating any time, it still permanently mutes them. I’ve already found workaround for this so I don’t really need to find the issue now.