shoot

Shoots the given in player in a maximum radius of 200 studs with the given in gun tool

modules.shoot(target: Instance, gun: Tool)

Parameters

  • target: The targets character

  • gun : The gun tool that you are holding in the character


Example

local starting_pos = game:GetService("Players").LocalPlayer.Character:FindFirstChild("HumanoidRootPart").Position
local distance = 50

local closest = modules.closest_player(distance,starting_pos)
if not closest then return end 

local gun = modules.get_gun(false)
if not gun then return end 

modules.reload(gun)
task.wait(1)
modules.shoot(closest,gun) -- will fire 1 bullet

Last updated