Module 1 · In your browser · challenge 2 of 3 in this lesson
inRange returns true when a and b are at most range studs apart
A code cell with the real Luau runner grades it. No Studio needed.
Open
Level 2, Builder
Challenge
Practice Vector3 and CFrame directly in the browser runner below. When every assertion passes, the cell completes this challenge.
- Start from
- The Run cell below
- Check it here
- Run the code cell; the challenge completes when it passes. No Studio needed.
Done means
- inRange returns true when a and b are at most range studs apart
- pointAhead uses cf * Vector3.new(0, 0, -distance) to place a point in front of cf
- midpoint returns the point halfway between a and b