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

Why does it only read L1 and not the others? Can anyone help?

Asked by 5 years ago
kreader.ClickDetector.MouseClick:Connect(function(player)

    if player.Backpack.L1 or player.Backpack.L2 or player.Backpack.L3 then
        light.BrickColor = BrickColor.new("Lime green")
        wait(1)
        light.BrickColor = BrickColor.new("Lily white")

    end
    if player.Backpack.L2 then
        light.BrickColor = BrickColor.new("Lime green")
        wait(1)
        light.BrickColor = BrickColor.new("Lily white")

    end
    if player.Backpack.L3 then
        light.BrickColor = BrickColor.new("Lime green")
        wait(1)
        light.BrickColor = BrickColor.new("Lily white")

    end
    light.BrickColor = BrickColor.new("Bright red")
    wait(1)
    light.BrickColor = BrickColor.new("Lily white")
end)
0
Please don't comment about spaces I know they are cancer lol NicoXerocious 29 — 5y
0
instead of using 'end', try using 'else if' on line 8 and 14 Tyler090130 619 — 5y

Answer this question