So in my game, I am using the new BasePart.CanTouch property for a hitbox, but every time I set BasePart.CanTouch to false, it gives me this warning in the output:
I want to disable this warning from being printed:
The reason I want to disable it is because I already know that the TouchTransmitter will be removed and therefore don’t need to see this warning, and more importantly, since it prints a massive amount of times, the flooding in the output causes the game to lag.
I have tried doing things like these to try to stop the warning from printing:
Destroying all the TouchTransmitters before setting CanTouch to false
Yes you are correct, I use the .Touched event of the BasePart which creates it, but the problem I am having is I want to disable the warning from printing when I set .CanTouch to false.
It is likely that it is re-creating the TouchTransmitter because you still have an active .Touched event somewhere. Try disconnecting that and then setting CanTouch to false.
I really appreciate the thinking man! Although I tried disconnecting the event before I set CanTouch to false exactly as you said but unfortunately it is still printing it
I am having the same issue: this unnecessary warning flooding the console.
All I am doing is setting:
object.CanTouch = false
shortly before the object is destroyed.
I know very well the “TouchTransmitter will be removed” since that is exactly what I expect to happen by disabling it, so it does not do anymore touch events.
Why is there a warning for this expected behavior?
Please remove.
I personally have not tried destroying also the TouchTransmitter at the same time, but as @Moonvane writes, that does not solve it either.
So basically I am on my phone rn so I am only 95% sure about this, but what fixed it for me is removing the touch transmitter right before I change CanTouch to false, and even though it didn’t fix it before like in the OP, it did this time
The warning appears in the Server output. Client output won’t have this message pop up. You are probably getting this still because you are in studio. You shouldn’t really worry about it unless you even want your Server output to be as clean as the Client’s.