I would like to modify the damage of M1903 Springfield in the following format of game:GetService("ReplicatedStorage")["Shared"]["ItemData"]["Firearms"]["M1903"] but I am unsure of how to do so.
return { DisplayName = "M1903 Springfield", Type = "Firearm", SubType = "Rifle", Description = "Bolt-action American rifle. Chambered in 7.62mm Springfield.", Icon = 781310187, GridSize = {9, 4}, SpawnRarity = 0.55, WorldMaximum = 20, PoseData = require(script:WaitForChild("Pose Data")), RecoilData = require(script:WaitForChild("Recoil Data")), ReloadData = require(script:WaitForChild("Reload Data")), EquipSlot = "Primary", AimFieldOfView = 33, Caliber = "7.62x63mm", DefaultFireMode = "Semiautomatic", FireRate = 40, InternalMag = false, InternalMagSize = 0, CanOneInTheChamber = false, Damage = 25, BurstCount = 3, PelletCount = 1, EffectiveRange = 475, MuzzleVelocity = 2600, ReloadTime = 1.15, ReChamberTime = 1, FireSound = "M1903", SuppressedFireSound = "M1903 Suppressed", ReloadSound = "Rifle 4", FireModes = { "Semiautomatic" }, MagazineTypes = { "7.62x63mm 5rd Clip M1903" }, MagazineSpawnRates = { ["7.62x63mm 5rd Clip M1903"] = 0.5 }, AttachmentTypes = { "ACOG", "Holographic", "Kobra", "M68 CCO", "Reflex", "SUSAT", "Rifle Scope", "AAC Suppressor", "Oil Filter Suppressor", "Osprey Suppressor", "Standard Suppressor" }, HitModifiers = { Head = 2, UpperTorso = 1, LowerTorso = 1, RightUpperArm = 0.8, RightLowerArm = 0.7, RightHand = 0.6, LeftUpperArm = 0.8, LeftLowerArm = 0.7, LeftHand = 0.6, RightUpperLeg = 0.8, RightLowerLeg = 0.7, RightFoot = 0.6, LeftUpperLeg = 0.8, LeftLowerLeg = 0.7, LeftFoot = 0.6 } }
Mistake: It is unnecessary to use brackets for one-word objects. You should do it like this:
game:GetService("ReplicatedStorage").Shared.ItemData.Firearms:FindFirstChild("M1903")
From here, you can do this:
local M1903 = game:GetService("ReplicatedStorage").Shared.ItemData.Firearms:FindFirstChild("M1903") M1903.Damage.Value = 25 -- Damage should be an Int/NumberValue