So I have this little snippet of code here and I am just curious as to what indexes when this code is run:
script.Parent.Touched:Connect(function(hit)
end)
What does the hit link to? Thanks!
So I have this little snippet of code here and I am just curious as to what indexes when this code is run:
script.Parent.Touched:Connect(function(hit)
end)
What does the hit link to? Thanks!
The first parameter of .Touched given (a.k.a. hit) returns a part that touched the object.
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
When you call hit I this function it will refer to the part that touched script.parent
Try putting print (hit.Name) in the function
And then walk onto the part the script is in
Will do, thank you!