Hello, I will get straight to the question…
I have a module script in which I create a ray using a module script in server script service. For some reason the ray is not detecting anything or hitting anything leading me to have an assumption that module scripts can’t cast rays?
Can someone clarify if i can or not been stuck with this problem for a 30mins now.
Thanks in adavnce…
Very hard to show the script since its in sections, since I like to code that way, I will show the variables and Vector Directions i have…
local destination = plr.Character.Muzzle.CFrame.lookVector
local speed = 50
local start = plr.Character.Muzzle.Position
local destination = destination * speed
local raycastResult = workspace:Raycast(start, destination, raycastParams) -- Params is just an ignore list with new api
Huh? Now that you mentioned it after the raycast It doesn’t even print a simple “Hello World”, I think there is an issue with the ray because code before it runs quite fine.
Is this module script being required by another script? If nothing in the module is running, it’s most likely because it isn’t even required with another script.
No everything is being run, checked though it seems that one line is just causing an error with the whole module script. It is required by a normal script to run a function called bulletHandle:Cast
which then runs a separate function in the script just called bullet which is the code that I posted.