Make a part fall slowly until it touches another part

Yep, I just checked. There’s a touchinterest

But shouldn’t anchored parts still detect collisions? I tried using physics already and I don’t know how to raycast.

Debug.

local __ONGROUND = false
coroutine.wrap(function()
repeat
		task.wait()
		newDrop.Position -= Vector3.new(0, 0.1, 0)
until __ONGROUND == true
end)()
newDrop.Touched:Connect(function(hit)
    print(hit.Name)
    print(hit.Parent.Name)
    print("HIT NO IF STATEMNT")
     if hit.Parent.Parent == workspace.Plates.Active then
              print("HIT IF STATEMNT")
          __ONGROUND = true
     end
end)

Try using this snippet and tell me if both prints.

My current code looks something like this:
image

image

script.Parent.Touched:Connect(function(hit)
	if hit.Parent.Parent == workspace.Plates.Active then
		print("touched")
	end
end)

My part is unanchored and all the necessary properties to detect collisions are enabled.

1 Like

They don’t. You can use GetTouchingParts though:

  • Every time you move the part, call GetTouchingParts to get the parts touching the falling part. If any of the touching parts are the ground part, call break to stop the loop.
1 Like

Expect GetTouchingParts() Does not work with parts with CanCollide off! This is obvious!
The properties of the part DOES NOT matter, what matters is CanTouch only!

Ah yeah, I forgot.

You need to create a touched connection (it won’t do anything besides allow GetTouchingParts to work) in addition to the loop.

My solution is probably the easiest among all (not sounding too conceited), so you should consider using this. @FloofyNezzled

1 Like

I tried, it doesn’t work. The VectorForce doesn’t move anything. Does the part have to be unanchored for the force to work?

That is the reason why it is classified as a physics constraint…

So yes, you must unanchor the part, and use the formula I have given so that it applies just enough force onto the part to make it slow fall.

yeah, it didn’t print anything, which is weird. It printed parts it touched when I tested my code earlier, but only touched some parts and not others.

Probably could only touch unanchored parts.

If parts aren’t physically simulated, they can’t “touch”. If your part is anchored, it’s not physically simulated. This means it can only touch parts that are physically simulated.

tl;dr:
Anchored parts can only touch unanchored parts. Unanchored parts can touch all parts.

Something wrong with the if statement then, what is workspace.Plates.Active?

Testing this now.
char limit char limit

What?

I’m pretty sure that’s not how collisions work

1 Like

When it’s unanchored the part just spins around like crazy so it doesn’t really work

This is a long a thread for no reason and I’m gonna clear some misconceptions.

Parts properties do not matter here!
Expect for CanTouch, which is responsible for .Touched and similar events.
The snippet I posted works when it touches but the if statement does not pass! Something is wrong with it. What is workspace.Plates.Active? And where is it located?

It’s a folder that almost all of the parts that it would touch are inside of. For the few it doesn’t touch, I found a new way to check those, but even then it didn’t even print the touched part’s name, so that’s not the main issue

Then you had set your force wrongly again.

  1. Get the number obtained from the formula
  2. Substitute that number into the component Y of the Vector3 of the force propeprty.
    image
  3. DO NOT TOUCH THE X AND Z COMPONENT. Leave them as zero.