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()?
#Clarification on raycast calling
1 messages · Page 1 of 1 (latest)
method.
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.
Each object in Roblox is it's own thing. Workspace is made and has different properties than repStorage. A method is it's own function within that object