Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to make dust from under the tires in the car?

Asked by 4 years ago

Hello. I am new here. Recently I learned how to make vehicles in a blender, so I'm trying to make a roblox game. My problem is that I don't know much about programming. I would like to know how to make a script that extracts dust from under the tires (I already have ParticleEmitter). Please help! I use A-chassis.

1 answer

Log in to vote
1
Answered by 4 years ago

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:

01local neededPart = game.Workspace.SandPart
02local dust = --Wherever your dust emitter is
03local tire1 = --Wherever the first tire is
04local tire2 = --Wherever the second tire is
05local tire3 = --Wherever the third tire is
06local tire4 = --Wherever the fourth tire is
07 
08tire1.Touched:Connect(function(hit)
09    if hit.Parent.Name == neededPart then
10        dust.Enabled = true
11    end
12end)
13 
14tire2.Touched:Connect(function(hit)
15    if hit.Parent.Name == neededPart then
View all 56 lines...

If this does not work, this is just a pseudocode of the working script.

0
It worked, thank you so much!!! MarcinekSt 10 — 4y
0
No problem! FrontsoldierYT 129 — 4y
Ad

Answer this question