Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how to fix player controls not detecting already pressed buttons when enabled?

ive been trying to make a custom movement system (groundpounding, leaping, ect) (They go alongside the default controls) and ive come across a problem when enabling / disabling controls. Whever i enable the controls it wont detect buttons that are already held down. would anyone have a work around for this?

local controls = require(game:GetService("Players").LocalPlayer.PlayerScripts.PlayerModule):GetControls()

controls:Disable()

controls:Enable()

1 answer

The reason that might be is because when any script that is disabled won't react to events that are fired during the time it is disabled. I don't think there is a workaround for this unless you are able to carry the event over to the module when it gets reactivated.

This discussion is preserved as it was. New answers, comments, and votes are closed.