Fastcast problem

I have problem with fastcast, i make framework in roblox studio and i making fire with fastcast.
I have next problem:

Here my code(Server):

local reps = game:GetService("ReplicatedStorage")
local remotes = reps:FindFirstChild("Remotes")

local FastCast = require(game.ReplicatedStorage.FastCastRedux )
local caster = FastCast.new()

FastCast.VisualizeCasts = true

remotes.Hit.OnServerEvent:Connect(function(mousePos, origin)
	local originPosition = origin	
	local direction = (mousePos - origin).Unit
	
   caster:Fire(originPosition, direction, 1)
end)

1 Like

The math looks fine, it probably has something to do with the remote event firing with the incorrect parameters.

1 Like

Problem in string

local direction = (mousePos - origin).Unit
1 Like

The math looks fine, it is probably that you a firing the remote event with the origin parameter or mousePos paramter as an Instance not a Vector3.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.