Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I'm having problems while casting rays. How do I fix this?

When I try to cast a ray using this script, an error saying Unable to cast value to Objects keeps on coming up. Here's the code

local Rae1 = Ray.new(M8.Union.Position + Vector3.new(3,5 ,0), M8.Union.Position + Vector3.new(-3,5 ,0))
local hit, pos1 = game.Workspace:FindPartOnRayWithIgnoreList(Rae1, (Floor))

what am I doing wrong?

4 comments

0

oh wait a minute

0

I think it's because my variable is called M8

0

nope

0

well, this question hasn't been answered in 2 hours. I doubt it will be answered.

1 answer

✓ Accepted answer

IgnoreList is a list, not an object, so replace (floor) with {floor}

1 comment

0

Ah I see. Thank you

This discussion is preserved as it was. New answers, comments, and votes are closed.