Attempt to call a nil value with fastcast

im trying to make fastcast work with module scripts so i do what i normally do with fastcast by requiring fastcastredux, creating a new caster local caster = fc.new() but then it errors out when i call for caster.RayHit:connect(hit) it saids it is nil yet it isnt

this is the fastcast im using: FastCast: Redux - Roblox

code:

local fc = require(script.Parent.FastCastRedux)
local caster = fc.new()
caster.RayHit:connect(hit)
caster.LengthChanged:Connect(updated)

function handler:fire(gun, origin: Vector3, dir: CFrame, settings, isrep, repchar)
    -- other code...
    local castp = RaycastParams.new()
    castp.FilterType = Enum.RaycastFilterType.Blacklist
    castp.IgnoreWater = true
    local castb = fc.newBehavior()
    castb.RaycaseParams = castp
    castb.Acceleration = Vector3.new(0, main.Presets.Gravity, 0)
    castb.AutoIgnoreContainer = false
    castb.CosmeticBulletContainer = workspace.Bullets
    castb.CosmeticBulletTemplate = bullet
    castp.FilterDescendantsInstances = {repchar, workspace.Camera, gun, game.Players.LocalPlayer.Character, workspace.Bullets}
            	
    caster:Fire(origin, dir, settings.vel, castb)
end

roblox is actually annoying i changed caster.RayHit:connect(hit) to caster.RayHit:Connect(hit)