Detecting When Im Close To A Lot Of Parts

Im not actually using parts.

Im using cframe values

1 Like

Please post a description of how you fixed it so that anyone with the same issue might get an answer when they search the forums.

Did you even read the thread? You’d have to use a loop for that.

Under normal circumstances that wouldn’t change anything, I assume there was a client-server replication issue in your code somewhere.

theres was not a replication error.

I just changed the code so that I had more control on the circumstances the touch event needed.

and as I’ve previously mentioned, a part’s Touched event/signal behaves the same on the client as it does on the server (unless there is some replication issue at hand).

the problem was that when I had the part touched by my character it detected me several times due to a delay on property changing.

However when I had the character touched by the part it allowed me to immediatly change my character’s primarypart cantouch

NVM, the thing I used to solve it previously was an obsolete garbage.

I fixed this with for loops but a different way that works pretty smooth:

1.I stored the character’s position once it recieved the CFrames.
2.I calculated the distance between the character’s primary part and the previous position.
3.I compared the distance and if it is greater than 250 then it recalculates everything and just gets the cframes that are within a 500 stud radius around the character.

That’s it, I’ve actually thought of it yesterday but I couldn’t figure out how to get the character’s position until today.