Try this then.
local __ONGROUND = false
newDrop.Position -= Vector3.new(0, 0.1, 0)
until __ONGROUND == true
if hit:FindFirstChild("Active", true) then
print("HIT IF STATEMNT")
__ONGROUND = true
What does the true inside of FindFirstChild mean?
Finds any descendent of an instance.
That can’t be the case, you can inspect my part model here:
January 31, 2023, 1:40am
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?
This isn’t true. Anchored turns on and off physics. Touched
If two parts without physics are moved into each other, no touch event fires because neither are running physics for their collisions.
two anchored parts will never fire the BasePart.Touched event on each other
I think you misunderstand, I mean anchored. Anchored matters. Like I said originally and am saying for the third time.
At this point, just please use and inspect my part model I had given to you so we can all call it a day and go home quick.
January 31, 2023, 1:45am
This code is wrong,
hit is the base part and shouldn’t have the “Active” instance as a child or descendant.
The code should be what it was originally:
hit.Parent.Parent == workspace.Plates.Active
Yeah, doesn’t work. I changed the if statement too, and it just doesn’t run at all
Yeah, this doesn’t help with their code. I tried it
So use GetTouchingParts? most of that code uses mouse stuff.
You can convert the event. There is a tedious solution too.
Weld an unanchored part to the part that is touching workspace.Plates then put the .Touched event to the welded part.
Do I use a Weld or WeldConstraint?
Okay, that’s what I thought. Making sure
January 31, 2023, 2:03am
Here is the code to solve this. Using physics is the easiest way and it will be automatically interpolated on the client so it’s smoother.
local part = newDrop
part.Anchored = false
part.CanTouch = true
local attachment = Instance.new("Attachment")
attachment.Parent = part
local velocity = Instance.new("LinearVelocity")
velocity.MaxForce = math.huge
velocity.VectorVelocity = Vector3.new(0, -0.1/0.03, 0)
velocity.Attachment0 = attachment
velocity.Parent = part
if hit.Parent.Parent == workspace.Plates.Active then
print("Hit ground "..part.Name)
You probably messed up setting up the constraint, so I made the code do that for you.
I’m not sure why, but even after welding the part it didn’t actually
weld if that makes sense
OMG finally, thank you so much
One question: Is there a specific reason to use “-0.1/0.03” over just -3.33?