Need help optimizing my Flash step ability

Well I’m not too good at scripting but I think that rather than using .Touched event that uses a lot of system resources (which lags you out) you can use a raycast to check if there’s a thing too close to the player in it’s flash-stepping direction! Maybe like cast it from player.character.CFrame.LookVector and length of like 1 stud or lower can be a good idea. This will save you a lot of system resources and hopefully you get help from this!
Well I’m assuming you know how to do raycasts since you are doing advanced stuff but just in case:
A intro to roblox raycasts