You can detect if a a raycast result is has can collide set to false or true.
the ray will still stop at that part though, which is why I didn’t use raycasting
Those things have to be put in a table, and you can’t put an if statement in a table
If you want to go the simple way, just put another wall inside of the wall. I think this will work, tell me if I am wrong.
That way player’s can’t see the outside.
This may be of assistance.
The thing with that is that I have mulitple maps, and I would have to go through each individual map to do that. In short, that would be very tedious. If raycasting really is a solution, I’d like to know how to make parts that have cancollide set to false not stop a ray
Is it need to have shift lock? Or can you permanently disable it?
Yes, my game does require shift lock in order to be functional. Why do you ask?
I asked because the way you looked outside of the wall was by using shift lock.
Oh I solved that problem a while ago. I added layers of walls to prevent players from looking outside
What is the location of this script? And also did the print work?
Then, when it stops check if the part has collissions off, if it does add it to a table and do the ray cast again. Repeat until it finds a non-collidable part and then compare the distance to see if it is avaiable.
I think I found the problem. You are using the touched event in a local script. Use a remote event to use the touched event. Also this is highly exploitable the player can teleport themselves basically where ever they want.
Why do you think the localscript is the problem? The part doesn’t exist on the server side
And also what fires the dash? Do you have to like click a button or press key key?
This is the reason you are getting teleported into the wall because the position of a part is in the center. What @DeFunnyPerson is false about the need for a Remote Event. I would consider using raycasting or Mouse.Hit to get an accurate position.
Well, he posted it since it’s a quote of his code.
Oops my mistake @xZylter is right about that. But still use a remote event because this can be exploited to make the player dash forward too much.
use collision groups from physics service you can use that with raycastparams to whitelist a collision group