Welding a part to the player then changing the size of the welded part every RenderStepped allows player to walk through walls

This is an issue I came across in the game I have been developing, and the effect doesn’t seem to be limited to just the size. Changing the position also could cause this. But I narrowed down the cause to the RenderStepped event. I understand that RenderStepped runs out of sync with the physics, but this happens even with the part set as Massless and with CanCollide set to false, which I thought meant the welded part has no physics related effect on the player.
Either way, it seems rapidly changing the size of a part welded slightly in front of the player every RenderStepped lets the player walk through objects that should normally collide with the player. The tunnelling doesn’t happen when you do the same thing through a Script or use the Stepped event in a LocalScript.
RenderStepped example:


RenderStepped code:

--this code is in the file "LocalPulseScript" under StarterCharacterScripts
local bomb = workspace:WaitForChild("Bomb");
local t = 0;
local dist = .5;

game:GetService("RunService").RenderStepped:Connect(function()
local newsiz = math.sin(t)*dist + 4;
bomb.Size = Vector3.new(newsiz,newsiz,newsiz)
t = t + 1.5;
end)

Server Script Demonstration:

Script code:

--this code is parented under the Part in ReplicatedStorage
local bomb = script.Parent;
local t = 0;
local dist = .5;
game:GetService("RunService").Heartbeat:Connect(function()
 local newsiz = math.sin(t)*dist + 4;
 bomb.Size = Vector3.new(newsiz,newsiz,newsiz)
 t = t + .8;
end)

Example place: quantum tunnelling.rbxl (23.6 KB)
Is this a physics bug or a natural consequence of the RenderStepped event running before the Stepped event?

5 Likes