local Distance = (RaycastResult.Position - Origin).Magnitude
local Target = RaycastResult.Instance:FindFirstAncestorOfClass("Model")
local TargetHumanoid = Target and Target:FindFirstChildOfClass("Humanoid")
local TargetTorso = Target and (Target:FindFirstChild("HumanoidRootPart") or Target:FindFirstChild("Head"))
InflictTarget.OnServerInvoke = function(Player, Type, ...)
if Type == "Gun" then
InflictGun(Player, ...)
elseif Type == "GunMelee" then
InflictGunMelee(Player, ...)
end
end
Can you show us the entire script? There are some functions and it doesn’t help that we don’t know what those do. The downside of using remotes is that when there’s a error, the game will say that it’s the line that called the remote.
The error says that somewhere you have added a number to an instance or a string so it can not complete the addition. Search the script for where you do math.
You’ve attempted to multiply a number by something that doesn’t exist - double check any properties or variables you might be using - I’d recommend just printing anything to see whats not being stored properly.
Found the issue. I was making a new game using an old gun system and it had an event going on so i used an _g for the multiplier. It wasnt here in the new game