How to make working traffic lights with AI cars moving depending on the traffic light color

How to make working traffic lights with AI cars moving depending on the traffic light color

Recently i’ve been wondering how to make working traffic lights with AI cars moving depending on the traffic light color. If you could show me how to make this then please reply.

2 Likes

AI is a very difficult subject. You should consider using inbuilt AI functions that are provided in luau such as pathfinding.

In terms of traffic lights, try recognising the states of which directions would be allowed to go and calculate movement from there.

There’s no specific answer to this question, you should just take things one step at a time. Work with humanoids and try expanding out to model movement.

Hope this helps,
-Tom :slight_smile:

1 Like

As @ThomasMGardiner said it is highly difficult to build a AI. What you can do is get rid of the AI by just making moving parts that stop when the light is red and go when its green.

1 Like