Ahhh. Now I see it. But I still have no idea on how to fix it since this is very confusing. I do understand the error now.
If you need it, here is the full code:
ShakeDist = 25
local CurrentCamera_v0 = workspace.CurrentCamera
local upval1 = game:GetService("Players").LocalPlayer:WaitForChild("PlayerSettings"):WaitForChild("ReducedShake")
local upval2 = require(game.ReplicatedStorage.CameraShaker).new(Enum.RenderPriority.Camera.Value, function(arg1)
CurrentCamera_v0.CFrame = CurrentCamera_v0.CFrame * arg1
end)
local var60 = game
function var60(arg1)
if arg1:IsA("Explosion") then
local Name_v0 = arg1.Name
if Name_v0 == "Explosion" then
local var0 = game.Players.LocalPlayer.Character.Head.Position - arg1.Position.magnitude / arg1.BlastRadius / 8
if var0 < ShakeDist then
upval2:Start()
upval2:ShakeOnce(arg1.BlastRadius / 2, 10, 0, 1.5)
end
end
end
end
game.Workspace.DescendantAdded:Connect(var60)
Just like in math, in programming, division and multiplication are prioritized.
Meaning in this line,
local var0 = game.Players.LocalPlayer.Character.Head.Position - arg1.Position.magnitude / arg1.BlastRadius / 8
you are first calculating the arg1.Position.magnitude / arg1.BlastRadius / 8 part, and only then you subtract it.
To prevent that, cover the subtraction in parentheses:
local var0 = (game.Players.LocalPlayer.Character.Head.Position - arg1.Position.magnitude) / arg1.BlastRadius / 8