You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
Hi! I’m trying to make a pathfinding monster that will chase the player if it sees them. However, I’ve encountered an error.
- What is the issue? Include screenshots / videos if possible!
I have a line of code:
local hit, pos = workspace:Raycast(ray, npc)
However, after the NPC pausing its movement and refusing to continue, I checked output to find:
Unable to cast Ray to Vector3 - Server
This occurs as soon as the player comes into the NPC’s line of sight.
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
After checking both the DevForum for already posted solutions, and the Developer Hub for any help (i.e. checking if code I was using was deprecated), I came out empty handed.
Any help would be greatly appreciated, thanks!