#UserInputService

1 messages · Page 1 of 1 (latest)

polar stump
#

local UserInputService = game:GetService("UserInputService")

local Hold = false

UserInputService.InputBegan:Connect(function(input, gameProssesed)
    if gameProssesed then return end

    if input.KeyCode == Enum.KeyCode.E then
        while Hold == true do
            wait(0.1)
        print("TEST1")
        end
    end
end)

UserInputService.InputEnded:Connect(function(input, Prossesed)
    if Prossesed then return end
    
    if input.KeyCode == Enum.KeyCode.E then
        while Hold == false do
        print("TEST2")
        end
    end
end)
grim gale
#

what did you need help

polar stump
#

if i did press "E" the game get crash

grim gale
#

because you're printing

polar stump
grim gale
#

try remove print

polar stump
#

yes

grim gale
#

k lemme know

polar stump
#

ohh i fixed it

#
local UserInputService = game:GetService("UserInputService")

local Hold = false

UserInputService.InputBegan:Connect(function(input, gameProssesed)
    if gameProssesed then return end

    if input.KeyCode == Enum.KeyCode.E then
        
        Hold = true
        while Hold == true do
        wait(0.1)
        print("TEST1")
        end
    end
end)

UserInputService.InputEnded:Connect(function(input, Prossesed)
    if Prossesed then return end
    
    if input.KeyCode == Enum.KeyCode.E then
        Hold = false
        print("TEST2")
    end
end)
grim gale
#

before and before ahh

high caveBOT
#

studio** You are now Level 2! **studio

polar stump
#

its too ez to fix