Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a way to make a ray ignore terrain water?

Asked by
IDKBlox 349 Moderation Voter
5 years ago

I know I can ignore terrain. But I only want to ignore the water. Is this possible? If so how would I do it?

I've tried researching it, but can't find anything about it. Thanks

2 answers

Log in to vote
1
Answered by 5 years ago

Ignore Water is the fourth parameter on FindPartOnRay, so if you simply set the fourth parameter to true you should be good.

https://developer.roblox.com/en-us/api-reference/function/Workspace/FindPartOnRay

0
Thank you very much! I had no idea... Guess I didn't look hard enough! IDKBlox 349 — 5y
Ad
Log in to vote
-1
Answered by 5 years ago

maybe this will help, tried to see if i could find water in terrain, here is the 1 line script

if game.Workspace.Terrain == Enum.Material.Water then

hope this helps

Answer this question