Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Problem with GetTouchingParts() doesn't active with a moving CFrame Part ?

Asked by
mist0s 38
4 years ago

Hey, so I have a script that when a part touched another part, a value change. So the Part1 is moving (the CFrame change) and the Part2 is not can collide.

Here is the script:

 local part = script.Parent;
  part.Touched:connect(function() 
      print("something touched !")
         local touching = part:GetTouchingParts(); 
         for _, p in next, touching do
              if p.Name == "Part1" then
                game.Workspace.MainScript.LavaTrigger.Value = true
                print("Lava triggered !")
               end
        end;
   end)

Maybe it didn’t work because the CFrame change. I tried to weld another part to the Part1 (plateform) but not working and any error in the output. Thanks for answers !

Answer this question