Yes, you have to. Alternatively you can use nil instead of false by default since both evaluate to false in a comparison. Another alternative is setting __mode of your table to “k”.
When the player leaves, it is always best practice to set any references of them to nil. So, yes, you should do playerCoolDown[plr] = nil when they leave!
On its own, that won’t cause a memory leak and such a tiny amount of data (a boolean) being stored in a table won’t be a big deal if you forget to clean it up. I think we need more context to say whether or not your script will memory leak (although, from just that, it will not).
I looked in the __mode documentation and found this:
Used in weak tables, declaring whether the keys and/or values of a table are weak. NOTE: References to Roblox instances are never weak. Tables that hold such references will never be garbage collected.
So the __mode method will not work here right? So I guess I will have to go with manually setting them to nil.
local weakTable = setmetatable({},{__mode = "v"})
table.insert(weakTable, workspace.Part)
workspace.Part:Destroy()
wait(1)
print(next(weakTable)) --prints nil; if __mode wasnt set, it would have printed the instance
But it printed the part’s name, (I ran it in the command bar by the way while the game was running.).
Regardless I still recommend just setting it to nil by default instead of false. The performance cost of allocating memory for the boolean for each cooldown activation should be insignificant.