#Clarification on raycast calling

1 messages · Page 1 of 1 (latest)

mortal escarp
#

I'm looking at workspace:Raycast(origin, dir, params) right now and I'm wondering if the workspace:Raycast part is creating a raycast within the workspace like I'm suspecting. But if that's the case, then theoretically, could I say something like ReplicatedStorage:Raycast and have a (hypothetical) raycast be created in there? But, would that make workspace:Raycast a function? If so, why is it not called like a typical function? Could you call a raycast within workspace without saying workspace:Raycast by using a typical function()?

ocean fiber
#

method.

willow siren
#

No. workspace:Raycast() is a method. Basically, it is a function that is called through an instance, passing the instance as a hidden self variable.

ocean fiber