Alright so I’m having trouble. I can’t seem to raycast towards a player. I’m having trouble with this sample.
local ray = Ray.new(origin,direction)
local partcell, v3pos = workspace:FindPartOnRay(ray,selfchar)
if partcell then
if partcell:IsDescendantOf(lookfor) then
The direction variable is the position of the target’s HumanoidRootPart.
It’s called in a while wait() do loop so it should update the position. But all it seems to do is cast into a weird direction where I have to walk to the model’s corner to trigger it.