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

How would I make a gun reload on IOS/Android?

Asked by 5 years ago

So my script involves pressing the R Key.

game:GetService("UserInputService").InputBegan:connect(function(Key, Chatting)
    if Key.KeyCode == Enum.KeyCode.R and Chatting == false then
        if Clip.Value ~= ClipSize and RAmmo.Value > 0 and Equipped == true and ReloadEnabled == false then
            Reload()
        end
    end
end)

On Iphone you can't really do much.. So is it possible for automatic reload?

1
you can either reload when a player tries to fire and his ammo is 0, or you can use contextactionservice which gives them a button MachoPiggies 526 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

There are a couple options:

  1. Do like @MachoPiggies said and add a ContextActionService

  2. Do an automatic reload when the player either has no ammo left or more preferably reload when the ammo isn't full.

Ad

Answer this question