While Currentkeybind == 1 do doesn't loops even its 1

I can’t believe this bro👩🏿‍🦲
image

image

any reason why it doesnt loops even its 1😡

If you start the loop when it equals 2 it won’t run because it breaks the loop. (Also what are you trying to do?)

1 Like

yea bro I think you just getting unlucky like it keeps picking currentkeybind 2 yea bro

learning new ._.

i’m trying to get rid of this little while loop cause i was wondering this.i was gonna make the part move with E/Q keybinds but while loop was not working.so i came here.

image
should be like this if loop breaks?

nope i did the print statement.

image

1 Like

If you want to do keybinds then just so whenever they press they key it sets a variable to true and then you can do

while true do task.wait()
    if QPressed then
        ...
    elseif EPressed then
        ...
    end
end

Not the best way but one of the easiest

image

works fine it needs now i can move my part to school lol

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.