Flashlight goes through walls

Hey all,

So I’m trying to make a simple game
Made myself a flashlight with some cubes but I have this problem that when I walk in to a wall, my flashlight will go through the wall…

I’ve tried putting on a collider on the entire flashlight but that didn’t work.

Any one knows how to fix this ? I’m still pretty new to unity.
Thanks!

You probably just need to enable shadows on the light itself. Without shadows, other objects won’t block the light.