I've been trying to make a brick clip through a wall using velocity, So the wall is 2 studs thick and the brick is 4 studs thick and brick is a stud away from the wall, (and 60 FPS)
Here's my code
thickness = 2 own_thickness = 4 space = 1 fps = 60 velocity = (thickness+own_thickness+space)/(1/fps) script.Parent.Velocity = Vector3.new(velocity,0,0)
I did this and the velocity was 420, but the brick bounces off the wall instead of going thru it, can someone help?
Sorry for wasting your time, I found the answer myself :D
own_thickness = 1 -- How thick the part is in the direction (x,y,z) it's gonna go. (in studs) wall_thickness = 4 -- The wall's thickness in the direction (x,y,z) that the part will go through. (in studs) space_between_wall = 4 -- Distance between the wall and the part. (in studs) space_for_to_go_thru = (own_thickness*2)+(wall_thickness*2)+(space_between_wall*2) formula = (space_for_to_go_thru/(1/60))*2 print(formula) script.Parent.Velocity = Vector3.new(formula,0,0) -- depending on which direction it's gonna go.