I don't know how to detect if a part touches terrain but you can make a flat transparent, non collidable part on top of the terrain and detect if the tires are touching that part. Make a part in Workspace and name it to SandPart.
Script:
01 | local neededPart = game.Workspace.SandPart |
08 | tire 1. Touched:Connect( function (hit) |
09 | if hit.Parent.Name = = neededPart then |
14 | tire 2. Touched:Connect( function (hit) |
15 | if hit.Parent.Name = = neededPart then |
20 | tire 3. Touched:Connect( function (hit) |
21 | if hit.Parent.Name = = neededPart then |
26 | tire 4. Touched:Connect( function (hit) |
27 | if hit.Parent.Name = = neededPart then |
34 | tire 1. TouchEnded:Connect( function (hit) |
35 | if hit.Parent.Name ~ = neededPart then |
40 | tire 2. TouchEnded:Connect( function (hit) |
41 | if hit.Parent.Name ~ = neededPart then |
46 | tire 3. TouchEnded:Connect( function (hit) |
47 | if hit.Parent.Name ~ = neededPart then |
52 | tire 4. TouchEnded:Connect( function (hit) |
53 | if hit.Parent.Name ~ = neededPart then |
If this does not work, this is just a pseudocode of the working script.