Skip to content Skip to sidebar Skip to footer

Sniper Shoot to the Left and to Hit Left Again

To assist in creating competitive combat-based experiences, several endorsed weapons are available for use in whatever game. The cadre system features projectile-based weapons with an over-the-shoulder photographic camera, and setting the projectile speed high plenty can simulate raycasting weapons like light amplification by stimulated emission of radiation guns.

To utilize an endorsed weapon in your game:

  1. Select one of the following weapons:
  1. On the weapon'south item page, click the dark-green Go button and confirm the transaction.
  2. In Roblox Studio, open the toolbox (ViewToolbox).
  3. Select your toolbox Inventory section.

  1. Locate the weapon and click it to add it into the place. When prompted whether to put the tool into the starter pack, click Yes if yous want players to start the game with the weapon or click No to just place the weapon in the game world as a pickup.

Each endorsed weapon contains a complete copy of the entire weapons system, including sounds and decals for all weapons.

The first time y'all bring in an endorsed weapon, move its WeaponsSystem folder into ServerScriptService. Later, be sure to delete the WeaponsSystem folder from any new endorsed weapons yous add to avert confusion while configuring weapon options.


System Binder Structure

The WeaponsSystem folder which controls all endorsed weapons is structured as follows:

ServerScriptService

WeaponsSystem (Folder)

Assets (Binder)

Animations (Folder) where animations used in the weapons system are placed.

Effects (Binder)

Casings (Folder) where all bullet casings are stored.

HitMarks (Folder) where all hitting marking furnishings are stored.

Shots (Folder) where all shot effects are stored.

WeaponsSystemGui (ScreenGui) as detailed in Weapons System GUI.

Configuration (Folder) where configuration values for the weapons system are kept.

SlowZoomWalkEnabled (BoolValue) which is involved in sprint command.

SprintEnabled (BoolValue) which is involved in sprint control.

Libraries (Folder) where all other ModuleScript|ModuleScripts used in the weapons system are located.

WeaponTypes (Folder) where all weapon types are specified.

ServerWeaponsScript (Script) which ensures only one instance of the weapons organisation runs.

Version (IntValue)

ClientWeaponsScript (LocalScript) which ensures only i case of the weapons system runs.

NetworkingCallbacks (ModuleScript)

WeaponData (RemoteEvent)

WeaponsSystem (ModuleScript)

Within the WeaponsSystem folder, dissimilar aspects are controlled past the following ModuleScript|ModuleScripts:

Aspect Handled Primarily Inside...
Weapons Functionality
  • WeaponsSystem
  • Libraries/BaseWeapon
  • WeaponTypes/BulletWeapon
  • WeaponTypes/BowWeapon
Shoulder Camera (reference)
  • Libraries/ShoulderCamera
Weapons GUI (reference)
  • Libraries/WeaponsGui
  • Libraries/DirectionalIndicatorGuiManager
  • Libraries/DamageBillboardHandler

Past default, the weapons system adds "sprint" adequacy to the game, so players can sprint by holding the Shift cardinal, pushing fully upward on the dynamic thumbstick (mobile), or pushing fully up on the left joystick (gamepad). If you want to disable sprinting, prepare SprintEnabled within WeaponsSystem/Configuration to false.

The system as well reduces role player speed while they're aiming/zooming, although this behavior tin be disabled by setting the SlowZoomWalkEnabled boolean to simulated.


Modifying a Weapon

Below are all the generic descendants needed to change a weapon or create a new weapon, forth with all optional descendants to override. More specialized options are specified in Weapon Options.

Throughout this documentation, note the following object and naming rules:

  • When something is specified equally a BasePart such every bit "Pointer (BasePart)," the object type just needs to inherit from BasePart, so it tin can be a Part, MeshPart, etc. However, if something is noted as a specific inherited blazon such every bit "Handle (Function)," that object must exist a Part.
  • Square brackets [] refer to the object in general and the name doesn't matter. For example, [Model] refers to the weapon's Model and you lot can rename it to whatever makes sense.

[Weapon] (Tool) named as information technology should appear in player's haversack.

WeaponType (StringValue) (required) — Proper name of the corresponding ModuleScript in WeaponsSystem/WeaponTypes binder (BulletWeapon and BowWeapon are the only options unless you add new weapon types).

[WeaponModel] (Model) (required)

One or more BasePart|BaseParts (required) — These make upward the physical weapon model and 1 should exist set as the model'southward Model/PrimaryPart|PrimaryPart.

Descendants of [WeaponModel]:

  • TipAttachment (Attachment) (required) — Position this attachment on a weapon model BasePart where you want bullets/projectiles to come out.
  • HandleAttachment (Zipper) (required) — Position this attachment on a weapon model BasePart where you want the handle to be welded to.
  • Fired (Sound) (optional) — Plays when the weapon is fired.
  • Reload (Sound) (optional) — Plays when the weapon is reloaded.
  • Additional descendants for any Weapon Options.

Handle (Part) (required) — Part positioned where you want the player to hold the weapon.

[Configuration] (Configuration) — Holds configuration items for the weapon. Note that all items accept default values, then you tin omit those y'all don't need to alter.

AmmoCapacity (IntValue) (optional) — Number of shots in each "ammo clip" before player must reload; default is 30. Note that ammo is unlimited and this does not specify how much ammo a histrion is carrying.

FireMode (StringValue) (optional) — Choose from either Semiautomatic (click once for each shot), Automated (hold click to continuously burn), or Burst (click to shoot a burst of bullets depending on NumBurstShots). Default is Semiautomatic.

ShotCooldown (NumberValue) (optional) — Minimum waiting time betwixt clicks; default is 0.i. For Automated weapons, this is too the time between shots while holding click.

BurstShotCooldown (NumberValue) (optional) — Time between each shot in a burst; default is the value of ShotCooldown and this simply matters if you lot specify FireMode to be Flare-up.

NumBurstShots (IntValue) (optional) — Number of shots per click/burst; default is 3 and this merely matters if you lot specify FireMode to be Burst.

HitDamage (NumberValue) (optional) — Amount of damage each straight striking does; default is ten.

FullDamageDistance (NumberValue) (optional) — Maximum altitude that shots will do full damage. Default is one thousand and anything hitting beyond this distance volition receive less and less impairment as the distance nears ZeroDamageDistance.

ZeroDamageDistance (NumberValue) (optional) — Anything hit at or beyond this distance will receive no impairment; default is 10000.

BulletSpeed (NumberValue) (optional) — Speed that bullets/projectiles travel when shot; default is 1000. Setting this to something like 20000 tin can simulate raycasting weapons like light amplification by stimulated emission of radiation guns.

MaxDistance (NumberValue) (optional) — Maximum altitude bullets/projectiles tin can travel earlier disappearing; default is 2000.

MinSpread (NumberValue) (optional) — Minimum amount of spread for the weapon; default is 0.

MaxSpread (NumberValue) (optional) — Maximum amount of spread for the weapon; default is value of MinSpread.

GravityFactor (NumberValue) (optional) — Corporeality that gravity should influence each bullet/projectile; default is 0. For example, this value for the Crossbow is 1 because its arrows should arc, just this value for the Rocket Launcher is 0 because rockets should travel directly.

HasScope (BoolValue) (optional) — Ready to true if you lot want to use the scope that'southward specified in Weapons System GUI. Default is imitation.

ReloadAnimation (StringValue) (optional) — Name of reload animation in WeaponsSystem/Avails/Animations; default is RifleReload.

AimTrack (StringValue) (optional) — Proper name of aim blitheness runway in WeaponsSystem/Assets/Animations; default is RifleAim.

AimZoomTrack (StringValue) (optional) — Name of aim zooming blitheness track in WeaponsSystem/Assets/Animations; default is RifleAimDownSights.

RecoilMin (NumberValue) (optional) — Minimum recoil added for each shot; default is 0.05.

RecoilMax (NumberValue) (optional) — Maximum recoil added for each shot; default is 0.5.

TotalRecoilMax (NumberValue) (optional) — Total maximum accumulated recoil (weapon's current recoil volition never be higher than this value); default is 2.

RecoilDecay (NumberValue) (optional) — Decay multiplier for recoil (essentially the rate at which recoil will become abroad after shooting); default is 0.825.

RecoilDelayTime (NumberValue) (optional) — Waiting time after shooting/clicking before recoil is added to photographic camera; default is 0.07.

StartupTime (NumberValue) (optional) — Length of time after equipping this weapon before the player can shoot; default is 0.ii. This prevents players from firing a single shot from a bunch of dissimilar weapons in quick succession.

FiredPlaybackSpeedRange (NumberValue) (optional) — Amount that the pitch can vary for the Fired sound of this weapon. Set this to 0 if you want the sound to always play at the aforementioned pitch. Default is 0.1.

NumProjectiles (NumberValue) (optional) — Number of bullets/projectiles that volition fire at the aforementioned time when you lot click once; default is 1. This is useful for weapons similar the Shotgun that fires multiple bullets at same time. Note that one shot will always use exactly one ammo regardless of this value.

Boosted children for any Weapon Options.

Weapon Options

Whatever number of the following options can be added/modified for whatever weapon. Note that some are dependent on others, such as Muzzle Particles which requires the necessary children for Projectile/Hit Effects and Sounds.

Bolt Animations and Sounds

An endorsed weapon'south bolt is the part that moves back and along each time you fire information technology.

  • Descendants of the weapon's Model:

  • Bolt (BasePart) (required) — The actual bolt that will move when it'due south animated.
  • BoltMotor (Motor6D) (required) — Used to animate the bolt. Make sure to set JointInstance/Part0|Part0 to the weapon'southward Model/PrimaryPart|PrimaryPart and JointInstance/Part1|Part1 to the Bolt.
  • BoltMotorStart (Zipper) (required) — Bespeak where the bolt is when it's at residual.
  • BoltMotorTarget (Zipper) (required) — Signal where the bolt animates to when shooting.
  • BoltOpenSound (Sound) (optional) — Plays when the bolt opens.
  • BoltCloseSound (Sound) (optional) — Plays when the bolt closes.
  • Children of the weapon's Configuration:

  • ActionOpenTime (NumberValue) (optional) — Fourth dimension information technology takes for the bolt to animate to open position; default is 0.025.
  • ActionCloseTime (NumberValue) (optional) — Fourth dimension it takes for the bolt to animate to airtight position; default is 0.075.

Ejecting Bullet Casings

Weapons can include physical bullet casings that eject upon firing and fall to the ground.

  • Descendants of the weapon's Model:

  • CasingEjectPoint (Attachment) (required) — Position this zipper on a weapon model BasePart where you want bullet casings to pop out. Notation that its orientation determines the direction the casings will pop out.
  • Children of the weapon'south Configuration:

  • CasingEffect (StringValue) (required) — Name of casing BasePart in WeaponsSystem/Assets/Furnishings/Casings.
  • CasingEjectSpeedMin (NumberValue) (optional) — Minimum squirt speed of casings; default is xv.
  • CasingEjectSpeedMax (NumberValue) (optional) — Maximum eject speed of casings; default is 18.
  • Optional child of casing BasePart inside WeaponsSystem/Assets/Furnishings/Casings:

  • CasingHitSound (Audio) (optional) — Plays when casings striking the footing.

Projectile/Hit Effects and Sounds

Physical projectiles can be specified for any weapon, along with Sound|Sounds, Beam|Beams, and ParticleEmitter|ParticleEmitters for hit effects and other special effects.

  • Children of the weapon'southward Configuration:

  • ShotEffect (StringValue) (required) — Name of a shot issue stored within WeaponsSystem/Assets/Effects/Shots.
  • ShouldMovePart (BoolValue) (optional) — Set to true if the weapon's ShotEffect should move with the projectile or false if not; default is fake. You should just set up this to truthful if in that location'due south a visible object that moves with each shot, such as an arrow or rocket.
  • BeamFadeTime (NumberValue) (optional) — Fourth dimension it takes for Beam0 and Beam1 to fade after bullet/projectile hits something. Default is nada which means no manual fade will exist practical by code.
  • BeamWidth0 (NumberValue) (optional) — Thickness of Beam0/Beam1 at Attachment0; default is ane.5.
  • BeamWidth1 (NumberValue) (optional) — Thickness of Beam0/Beam1 at Attachment1; default is 1.eight.
  • NumHitParticles (IntValue) (optional) — Number of particles the HitParticles ParticleEmitter will emit. Default is 3.
  • HitParticlesUsePartColor (BoolValue) (optional) — Gear up to true if you want the hit particles to be the color of the hitting surface, false if you lot desire striking particles to not alter color. Default is true.
  • Descendants of the specified ShotEffect noted in the previous section (located within WeaponsSystem/Assets/Effects/Shots):

  • Flying (Sound) (optional) — Plays while bullet/projectile is traveling.
  • Beam0 (Beam) (optional) — Start slot for a trailing beam behind bullet/projectile. Don't forget to gear up attachments (run into descendants which follow).
  • Beam1 (Beam) (optional) — 2d slot for a trailing axle backside bullet/projectile. Don't forget to set attachments (see descendants which follow).
  • Attachment0 (Attachment) (optional) — Dorsum of trailing beams; make certain to prepare Attachment0 on both Beam0 and Beam1 to this.
    • TrailParticles (ParticleEmitter) (optional) — Direct kid of Attachment0; this volition emit from Attachment0 while the bullet/projectile is traveling.
  • Attachment1 (Zipper) (optional) — Front of trailing beams; make certain to set Attachment1 on both Beam0 and Beam1 to this.
    • LeadingParticles (ParticleEmitter) (optional) — Directly child of Attachment1; this will emit from Attachment1 while the bullet/projectile is traveling.
  • HitEffect (Attachment) (optional) — Position doesn't affair; the position will be set to Beam0.Attachment1 when the bullet/projectile hits, and so you must specify Beam0 and its attachments for this to piece of work properly.
    • HitSound (Sound) (optional) — Direct child of HitEffect; plays when the bullet/projectile hits.
    • HitParticles (ParticleEmitter) (optional) — Direct child of HitEffect; emits when the bullet/projectile hits.
  • Any Function/MeshPart/SpecialMesh that you want to announced as a physical projectile (optional). Brand sure y'all set ShouldMovePart noted in the previous department to true if you have a visible object hither.

Muzzle Particles

This option emits particles from the specified ParticleEmitter at the weapon'due south TipAttachment Attachment when information technology'southward fired.

  • Children of the weapon'due south Configuration:

  • ShotEffect (StringValue) (required) — Name of a shot effect stored inside WeaponsSystem/Avails/Effects/Shots.
  • NumMuzzleParticles (IntValue) (optional) — Number of muzzle particles that volition be emitted; default is 50.
  • For the specified shot effect (located in WeaponsSystem/Assets/Effects/Shots), add a ParticleEmitter named MuzzleParticles:

Muzzle Flashes

This choice creates a Axle flash result when the weapon is fired.

  • Descendants of the weapon's Model:

  • MuzzleFlash0 (Attachment) (required) — Used to specify one side of muzzle flash. Position doesn't matter.
  • MuzzleFlash1 (Attachment) (required) — Used to specify opposite side of cage flash. Position doesn't thing.
  • MuzzleFlash (Beam) (required) — Brand sure to set Beam/Attachment0|Attachment0 to MuzzleFlash0 and Beam/Attachment1|Attachment1 to MuzzleFlash1.
  • Children of the weapon's Configuration:

  • MuzzleFlashTime (NumberValue) (optional) — Length of fourth dimension muzzle flash volition evidence for; default is 0.03.
  • MuzzleFlashRotation0 (NumberValue) (optional) — Minimum rotation of muzzle wink; default is -math.pi.
  • MuzzleFlashRotation1 (NumberValue) (optional) — Maximum rotation of cage flash; default is math.pi.
  • MuzzleFlashSize0 (NumberValue) (optional) — Minimum size of muzzle wink; default is 1.
  • MuzzleFlashSize1 (NumberValue) (optional) — Maximum size of muzzle flash; default is 1.

Trail Behind Projectiles

This option creates a trail of varying length from the weapon to the projectile impact indicate.

  • Children of the weapon's Configuration:

  • TrailLength (NumberValue) (optional) — Length of trail behind bullet/projectile; default is naught which means the trail length will instead exist calculated using TrailLengthFactor.
  • TrailLengthFactor (NumberValue) (optional) — The trail length will be set to this value multiplied by the distance the bullet/projectile traveled in the last frame; default is 1. Note that this will be overridden if you lot include TrailLength.
  • ShowEntireTrailUntilHit (BoolValue) (optional) — Gear up to true to render the trail from the weapon tip all the way to wherever the projectile is; this will override both TrailLength and TrailLengthFactor and the trail will simply disappear once the projectile hits something. Prepare to false to use 1 of the above 2 options to summate trail length. Default is false.

Hit Marks

This visual improver appears on the surface where projectiles hit and is useful for arrows, bullet holes, scorch marks, etc.

  • Children of the weapon's Configuration:

  • HitMarkEffect (StringValue) (optional) — Name of hit mark consequence stored within WeaponsSystem/Avails/Effects/HitMarks; default is BulletHole.
  • AlignHitMarkToNormal (BoolValue) (optional) — Set to true if the hit mark should e'er align flat confronting the surface like a bullet hole, or faux if the striking mark should appear stuck in the surface from the direction the projectile came from (like an arrow). Default is true.
  • Descendants of the specified HitMarkEffect noted in the previous section (located within WeaponsSystem/Assets/Effects/HitMarks):

  • Glow (Decal) (optional) — Appears on the hit surface fully opaque, and then rapidly gets more transparent, like a glowing effect on the surface that fades quickly. Useful for things like showing a glowing red mark where explosives hit.
  • BulletHole (Decal) (optional) — Appears on the hit surface fully opaque and, after 4 seconds, fades to transparent over 1 second.
  • ImpactBillboard (BillboardGui) (optional) — Displays at the hit surface, e'er facing towards player.
    • Touch on (ImageLabel) (optional) — Direct child of ImpactBillboard; this begins fully opaque, grows to the full size of the ImpactBillboard over 0.1 seconds, then shrinks to half its size and fades to full transparency over 0.i seconds.
  • Whatsoever Function/MeshPart/SpecialMesh that you want to appear as a physical projectile (optional). For example, including an pointer MeshPart and setting AlignHitMarkToNormal noted in a higher place to simulated will brand the arrow stick out of the surface from the direction you shot it.

Exploding Projectiles

Projectiles tin can include an Explosion object to damage players in an expanse effectually the impact point.

  • Children of the weapon'southward Configuration:

  • ExplodeOnImpact (BoolValue) (optional) — Set up to true if you want bullets/projectiles for the weapon to explode on impact, false otherwise. Default is imitation.
  • BlastRadius (NumberValue) (optional)Explosion/BlastRadius|BlastRadius of explosion; default is 8.
  • BlastPressure (NumberValue) (optional)Explosion/BlastPressure|BlastPressure of explosion; default is 10000.
  • BlastDamage (NumberValue) (optional) — Impairment dealt to things in the center of the explosion. Notation that the explosion does less damage the farther abroad hit objects are from the center of the explosion. Default is 100.

Charging Weapon

A charging weapon like the Railgun must exist charged up between shots before it tin fire again.

  • Descendants of the weapon's Model:

  • Charging (Sound) (optional) — Plays while the weapon is charging.
  • Discharging (Sound) (optional) — Plays while the weapon is discharging, for example if you accuse the weapon but partially and release the shoot push.
  • ChargeComplete (Sound) (optional) — Plays when the weapon has reached total accuse.
  • DischargeComplete (Sound) (optional) — Plays when the weapon has completely discharged.
  • ChargeGlow (BasePart) (optional) — This object will go less transparent as the weapon charges up, such that it will be fully opaque at 100% charge.
  • ChargeCompleteParticles (ParticleEmitter) (optional) — Emits when the weapon has finished charging. This emitter can be a child of whatsoever model BasePart or a child of an Attachment within the BasePart.
  • DischargeCompleteParticles (ParticleEmitter) (optional) — Emits when the weapon has completely discharged. This emitter tin can be a child of any model BasePart or a child of an Attachment within the BasePart.
  • ChargingParticles (ParticleEmitter) (optional) — Emits while the weapon is charging. You tin include multiple emitters of this name and each will emit while charging. This emitter tin be a child of any model BasePart or a child of an Attachment within the BasePart.
  • Children of the weapon'southward Configuration:

  • ChargeRate (NumberValue) (required) — Rate at which the weapon will charge. This value must be specified to betoken that the weapon uses charging.
  • DischargeRate (NumberValue) (optional) — Rate at which the weapon will belch; default is 0 which means the weapon volition non discharge at all.
  • ChargePassively (BoolValue) (optional) — Set to true if you desire the weapon to passively charge and then information technology will shoot instantly when you click, or false if you want to click/touch on to accuse the weapon and have it fire one time full charge is reached. Default is false.
  • ChargingParticlesRatePerCharge (IntValue) (optional) — Number of particles that will emit out of all ChargingParticles emitters multiplied by the current charge of the weapon. Default is 20, meaning that if the weapon charge is at ten%, each ChargingParticles emitter will emit 2 particles (20*0.1), and if the weapon accuse is at 90%, each emitter will emit 18 particles (20*0.nine).
  • FireDischarge (NumberValue) (optional) — Corporeality of charge the weapon volition lose afterward firing a fully charged shot; default is 1.
  • NumChargeCompleteParticles (IntValue) (optional) — Number of particles the ChargeCompleteParticles emitter will emit one time the weapon is fully charged. Default is 25.
  • NumDischargeCompleteParticles (IntValue) (optional) — Number of particles the DischargeCompleteParticles emitter will emit when the weapon is completely discharged. Default is 25.

Bow Weapon

A bow weapon like the Crossbow can include a realistic cord and arms construction, as well every bit a visual arrow nocked to the string.

  • Make the weapon into a charging weapon as specified in Charging Weapon. For example, add the required ChargeRate within the weapon'southward Configuration that specifies how fast the string is fatigued. Additionally, consider adding optional descendants to the weapon'southward Model such as a Charging sound for the cord/arms being pulled dorsum.
  • Set the WeaponType to BowWeapon as indicated in Modifying a Weapon.
  • Descendants of the weapon's Model:

  • LeftString (Beam) (optional) — The visual left half of the string.
  • RightString (Axle) (optional) — The visual right one-half of the string.
  • Arrow (BasePart) (optional) — The arrow that appears when the bow is fully drawn. Note that this is merely for visual appearance on the bow (the actual fired arrow volition be a ShotEffect as outlined in Projectile/Hit Effects and Sounds).
  • String1 (Attachment) (optional) — The center point of the string.
  • StringLoose (Attachment) (optional) — Bespeak where String1 should be when the bow is at rest.
  • StringTight (Attachment) (optional) — Indicate where String1 should be when the bow is fully drawn.
  • Artillery (Part) (optional) — A office that just serves equally an internal indicator that the bow arms will be animated. This may contain the post-obit direct children:
    • LeftString0 (Attachment) (optional) — Point where the left side of the string is attached to the bow.
    • RightString0 (Attachment) (optional) — Betoken where the right side of the cord is fastened to the bow.
    • LeftLoose (Attachment) (optional) — Bespeak where LeftString0 should be when the bow is at balance.
    • RightLoose (Zipper) (optional) — Point where RightString0 should exist when the bow is at balance.
    • LeftTight (Attachment) (optional) — Betoken where LeftString0 should be when the bow is fully drawn.
    • RightTight (Attachment) (optional) — Point where RightString0 should be when the bow is fully drawn.
    • [SpecialMesh] (SpecialMesh) (optional) — The function of the bow that will actually bend when the bow is drawn. Note that you must specify the post-obit four Vector3Value objects to brand this breathing.
    • LooseOffset (Vector3Value) (optional) — Offset of the SpecialMesh when the bow is at residuum.
    • TightOffset (Vector3Value) (optional) — Outset of the SpecialMesh when the bow is fully fatigued.
    • LooseScale (Vector3Value) (optional) — Scale of the SpecialMesh when the bow is at rest.
    • TightScale (Vector3Value) (optional) — Scale of the SpecialMesh when the bow is fully drawn.

Weapons System GUI

The cadre weapons arrangement interfaces with this organisation to update the GUI based on things like spread of the gun, indicators for when you get hit or hitting others, etc.

In WeaponsSystem/Assets, the weapons organisation GUI is structured as follows:

WeaponsSystem (Folder)

Assets (Binder)

Animations (Folder)

Effects (Folder)

WeaponsSystemGui (ScreenGui) which is parented to PlayerGui when the game starts.

ScalingElements (Folder) whose elements automatically calibration with the screen size.

DirectionalIndicators (Folder) where all directional indicators should get.

Crosshair (Frame) whose four child ImageLabel|ImageLabels show up when a weapon is equipped. Notation that the size of this frame adjusts due to changes in weapon spread, but the size of the four children never change.

[UIAspectRatioConstraint] (UIAspectRatioConstraint)

Bottom (ImageLabel)

Left (ImageLabel)

Right (ImageLabel)

Elevation (ImageLabel)

HitMarker (Frame)

[UIAspectRatioConstraint] (UIAspectRatioConstraint)

HitMarkerImage (ImageLabel) which appears then fades out when you lot successfully hit some other player.

LargeTouchscreen (Frame) whose buttons show upwardly on big touchscreens.

AimButton (ImageButton)

FireButton (ImageButton)

Scope (Frame)

ScopeImage (ImageLabel) which shows upwardly when zooming on a weapon with HasScope fix to true (come across Modifying a Weapon).

[UIAspectRatioConstraint] (UIAspectRatioConstraint)

BottomBlack (Frame)

LeftBlack (Frame)

RightBlack (Frame)

TopBlack (Frame)

SmallTouchscreen (Frame) whose buttons bear witness up on small touchscreens.

AimButton (ImageButton)

FireButton (ImageButton)

Create a Directional Indicator

Directional indicators are used to prove the direction of something around the thespian's crosshair. For example, if someone shoots yous, a ruby semi-circle tin can show up around your crosshair in the direction the shot came from. Other examples include indicators to show the management of footsteps, indirect gunfire, or even environmental objects such as chests.

To create a new indicator, add it in WeaponsSystemGui/ScalingElements/DirectionalIndicators and structure information technology like so:

WeaponsSystemGui (ScreenGui)

ScalingElements (Folder)

DirectionalIndicators (Binder)

[Indicator] (Frame)

[UIAspectRatioConstraint] (UIAspectRatioConstraint) (required)

[ImageLabel] (ImageLabel) (required) — Prototype of the directional indicator. Tweaking the rotation of the paradigm in Studio may exist required unless yous upload the image so that it's facing downwardly and there'southward little or no bare space effectually information technology.

[UIAspectRatioConstraint] (UIAspectRatioConstraint) (required)

[Configuration] (Configuration)

DistanceLevelFromCenter (NumberValue) (optional) — Number of distance levels from the middle of the screen (each distance level is nearly 0.03 screen scale); default is 6.

FadeTime (NumberValue) (optional) — Indicator fade time following its activation and the TimeBeforeFade fourth dimension; default is one.

Name (StringValue) (optional) — Proper noun of the directional indicator as you want to reference information technology in lawmaking; default is the name of the indicator's top level Frame.

TimeBeforeFade (NumberValue) (optional) — Number of seconds that the indicator will announced for before fading; default is 1.

TransparencyBeforeFade (NumberValue) (optional) — Transparency of the indicator before information technology starts to fade; default is 0.

WidthLevel (NumberValue) (optional) — Number of width levels from heart (each width level is about 0.03 screen calibration); default is the value of DistanceLevelFromCenter.

Once created, y'all can activate an indicator via the following command inside WeaponsSystem/Libraries/WeaponsGui where indicatorName is the cord proper name of the indicator to activate and worldPos is the earth position where the directional indicator should bespeak.

Show Damage Billboard

The damage billboard is used to prove little numbers above a player's head when they are damaged. These volition only bear witness upwards for the player that damaged another histrion, non for spectating players.

Damage billboards are handled in WeaponsSystem/Libraries/DamageBillboardHandler and can exist activated from any client-side lawmaking equally follows, where damage is the amount of impairment done and adornmentPart is the part on which to adorn the billboard, such equally the victim's head.

Shoulder Photographic camera

The shoulder camera is a third-person camera that looks over the player's right shoulder. To customize the shoulder camera, change the variables under the -- Configuration parameters (constants) comment in the ShoulderCamera.new() office of WeaponsSystem/Libraries/ShoulderCamera. Yous can modify things such every bit field of view, offset from histrion, walk speed while sprinting or zooming, etc.

stewartwhortiven50.blogspot.com

Source: https://developer.roblox.com/en-us/articles/weapons-kit

Post a Comment for "Sniper Shoot to the Left and to Hit Left Again"