Send UserTable to ActiveCast when it doesn't exist?

I am trying to use the FastCast Redux script from Eti, and it working great. Problem is, I have no idea how to pass on more info to the active cast.

local Target = GunCFrame:ToWorldSpace(CFrameOffset)
local Direction = (Target.Position-GunFirePoint).Unit
CastBehavior.Acceleration =,-workspace.Gravity-GunProperties[1],0)
print("Firing bullet")

This script receives the call to fire a bullet and works great. I removed a good amount of code to make it simple and readable.

local character=result.Instance
 if character and character.Parent.Parent.Name ~=tostring(game:GetService("Players"):GetPlayerFromCharacter(Player).UserId) and character.Parent.Name ~=tostring(game:GetService("Players"):GetPlayerFromCharacter(Player).Name) then
  if Bomb then

Now, my question is, how do I get a table passed from OnServerEvent to OnRayHit?
In the doc/api of FastCast Redux, it says the ActiveCast object is supposed to pass UserData as the last parameter. Perfect. SO WHERE DO I PUT THAT? how do I access Active Cast before OnRayHit is called? I need to send info WHILE activating the Fire function, but I dont see a spot to insert data.
Here is the documentation

You take Caster, fire a function called Fire, and make an ActiveCast as a result. But, while a ActiveCast exist, it’ll call the OnRayHit immediately if an object is detected on the ray. So, its impossible to access ActiveCast.UserData to put your custom data in before the OnRayHit is called.

If anyone who messes with FastCast Redux knows what I am supposed to do, I would greatly appreciate pointing me in the right direction.

1 Like

after doing Caster:Fire(), you can access the UserData.


Caster.UserData['Owner'] = owner

and you can access the ActiveCast's UserData inside OnRayHit.

Thanks. i’ve found out in another post that Caster:Fire() returns itself too. So ActiveCast=Caster:Fire() is viable and shorter