Raycast Params not working and giving strange warning

These params are supposed to ignore the players character, However I do not think they are being applied because the raycast still hits the player. It also produces this strange warning "Argument count mismatch. Function expects 2 arguments, but 3 are specified.

The constructor of Ray only takes in 2 parameters, which are “origin” and the “direction”. It does not take in RaycastParams, and thus warns you "Argument count mismatch. However, the “WorldRoot:Raycast” does takes in RaycastParams.

Reference:

Ray (roblox.com)
RaycastParams (roblox.com)
WorldRoot:Raycast (roblox.com)

1 Like