#Is there a way to make a script only work if shiftlock is toggled?
1 messages · Page 1 of 1 (latest)
there's probably a property for this somewhere but if not, try using userinputservice
** You are now Level 1! **
i need a way to make the script recognize that im shiftlocked
** You are now Level 2! **
but i dont know if doing "if key.KeyCode == Enum.KeyCode.S" can have a and statement after to make two requirements for it to run
as in
if shiftlocked then end
?
id have to make shiftlock some kind of variable with a meaning for that to work
shiftlocked doesnt exist in the scripts dialect
like if i did to uis shiftlocked isnt a input
its a state that needs to be detected as true for its duration
i think
let me try that actually
make one
and change it with a
if key.KeyCode == Enum.KeyCode.LeftShift then
that's what i meant
UserInputService has a property called MouseBehavior which can me an Enum.MouseBehavior and Enum.MouseBehavior.LockCenter is shiftlock
You tried seraching in developer.roblox.com api? There is all about roblox scripting
I think this can help
^ that's pretty much what I said
oh alr then
how could i implement that though
it worked actually
but now if i unshiftlock while walking backwards it keeps playing
is there a way to constantly check if its shiftlocked
it only checks once right
to intiate the script
well you're in control of how many times it checks. You can use a while function