I'm pretty sure this is right. This is in a normal script directly inside the button that is supposed to press it for 5 seconds before you can use it again.
button = script.Parent
button.ClickDetector.MouseClick:connect(function()
if button.CanPress == true then
button.CanPress = false
button.Size = Vector3.new(0.29, 1.37, 1.11)
wait(5)
button.CanPress = true
button.Size = Vector3.new(0.57, 1.37, 1.11)
button.ClickDetector.MaxActivationDistance = 8
end
end)
