#Help

19 messages · Page 1 of 1 (latest)

little ermine
#

I forgot to tell you, I want to make a mobile button for it.

jagged oasisBOT
#

studio** You are now Level 8! **studio

limber hinge
#

Connect

jagged oasisBOT
#

studio** You are now Level 3! **studio

little ermine
limber hinge
#

In :Connect()

#

Your code has a flaw in grammar

little ermine
limber hinge
#

Yup

little ermine
#

I'll try it now

limber hinge
#

Does it work?

little ermine
#
function FlashLightButton(BindName, InputState)
    UIS.InputBegan:Connect(function(input)
        local KeyCode = Enum.KeyCode.F;
        if KeyCode == Enum.KeyCode.F or InputState == Enum.UserInputState.Begin and BindName == 'FlashBind' then
            if script.flashlight.Value ~= false then
                script.flashlight.Value = false;
                return;
            end;
        elseif KeyCode == Enum.KeyCode.F and BindName == 'FlashBind' then
            return
        end
        script.flashlight.Value = true;
        print(KeyCode)
    end);
end```
final sphinx
#

you're defining KeyCode as F

#

in
local KeyCode = Enum.KeyCode.F;

#

and then you're checking if KeyCode == Enum.KeyCode.F

#

insetad do