Yeah printed it and it’s nil. I’m using a module script for the knockback stats. Something probably went wrong with it. The location for it is correct I just checked. I’ll send over the entire script.
local module = {}
-- Services
local RS = game:GetService("ReplicatedStorage")
local SS = game:GetService("ServerStorage")
local StarterPlayer = game:GetService("StarterPlayer")
local SoundService = game:GetService("SoundService")
local Debris = game:GetService("Debris")
-- Folders
local WeaponsSounds = SoundService.SFX.Weapons
local RSStorage = RS.Storage
local RSModules = RSStorage.Modules
local SSModules = SS.Modules
local Events = RSStorage.RemoteEvents
-- Events
local CombatEvent = Events.Combat
local VFX_Event = Events.VFX
-- Modules
local SoundsModule = require(RSModules.Combat.SoundsModule)
local ServerCombatModule = require(SSModules.CombatModule)
local WeaponStats = require (SSModules.Weapons.WeaponStats)
function module.BodyVelocity (parent, HRP, Knockback, stayTime)
local bv = Instance.new ("BodyVelocity")
bv.MaxForce = Vector3.new(math.huge,0,math.huge)
bv.P = 50000
bv.Velocity = HRP.CFrame.LookVector * Knockback
bv.Parent = parent
Debris:AddItem(bv,stayTime)
end
function module.Normal_HitboxHit(plr,char,weapon,Hitbox,...)
local HitAnim = ...
Hitbox.OnHit:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and hit.Parent ~= char then
local eChar = hit.Parent
local eHum = eChar:FindFirstChild("Humanoid")
local eHRP = eChar.HumanoidRootPart
if eHum.Health > 0 then
local WeaponStat = WeaponStats.getStats(weapon)
local damage = WeaponStat.Damage
local knockback = WeaponStat.Knockback
print (knockback)
print (damage)
eHum:TakeDamage(damage)
ServerCombatModule.stopAnims(eHum)
VFX_Event:FireAllClients("CombatEffects", RSStorage.VFX.Combat.Blood, hit.CFrame, 3)
SoundsModule.PlaySound(WeaponsSounds[weapon].Combat.Hit, eChar.Torso)
eHum.Animator:LoadAnimation(HitAnim):Play()
module.BodyVelocity (char.HumanoidRootPart, char.HumanoidRootPart, knockback, .2)
module.BodyVelocity (eHRP, eHRP, knockback, .2)
end
end
end)
end
return module