Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

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

Log in to vote
0
Answered by 5 years ago

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.

Ad

Answer this question