#raycast no work

17 messages · Page 1 of 1 (latest)

agile kernel
#

U calculate

#

Wrong

#

(destination - body.Position).Unit * distance

#

distance is max dist u want it to travel

ruby gate
#

what do you mean by it doesn't work?

agile kernel
#

Try

#
print(rayCastResult.Instance.Name)
print(rayCastResult.Instance.ClassName)
#

To see if conditions are met

#

@oblique scaffold

ruby gate
#

do you check rayCastResult is not nil before hand?

#

before accessing its Instance property

agile kernel
#

Means the conditions are not met

ruby gate
#

a raycast only detects baseparts or terrain

#

not models

#

so this condition will never be met

#

what will be detected are the body parts of the character