#Raycast returning nil although it seemingly shouldn't
44 messages · Page 1 of 1 (latest)
of course
basically i am casting rays through a basepart but although it visually intersects, the result is nil
the image shows the waypoints of the trajectory, which as you can see go through the baseplate
** You are now Level 4! **
thanks
Im not sure whats the error but try to change,
local result = workspace:Raycast(Shell.Position, targetPosition) to local result = workspace:Raycast(Shell.Position, targetPosition - Shell.Position)
Oh wait
There are more parts of code
Forgor to read everything
💀
you are very possibly right
don't bother
i put in a position not a direction
which is incorrect
It needs a vector3
Argument
So yes
If it dont help tell me, i will continue to read other parts u sent
well that doesn't seem to change much apparently
i'll try and dig more, but thanks for your help
maybe
the shell movement
too fast
it might pass through the baseplate between two heartbeat events without being detected by the raycast
use Workspace:Raycast with RaycastParams parameter
and set the FilterType property to Enum.RaycastFilterType.Blacklist
also
CollisionGroup property to Debris
so u will detect
collisions
that dont collide
wait that sounds
weird
mhmm no idea
tried largely increasing the baseplate's Y size so the moving object would certainly stay in it for more than seconds, but it doesn't change much either
and i don't think filters are the way to go since since i really just want any basepart which has CanCollide to true
