I’ve tried to fix it but have found no success.
This segment is within a function for something else.
The buttons are created with Instance.new and are parented to a gui.
I’ve checked on the devforum and got a general gist on what is happening but do not know how to solve this problem. If you need anything clarified feel free to ask for it.
local playerPressedButtonOnce = false
if playerPressedButtonOnce == false then
playerPressedButtonOnce = true
-- whatever you want to happen put here
end
This makes sure the player can’t fire it twice. Not the exact code you would need, but I think you know how you could move it around to fit in there.