When i return a ray it via remote function it always returns nil to the server
is there a work around this? or no i’m trying to keep everything optimized and doing it on the server seems weird
local script-
script.Parent:WaitForChild(“Raycast”).OnClientInvoke = function(char)
local pos = game.Players.LocalPlayer:GetMouse().Hit.Position
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Whitelist
params.FilterDescendantsInstances = {game.Workspace:WaitForChild(“Map”),game.Workspace:WaitForChild(“Players”)}
return workspace:Raycast(char:WaitForChild("ArtillerHandle").Position, (char.ArtillerHandle.Fire.WorldPosition - pos).unit * 100, params)
end
it’s a tool and char is actually the character