Part not being detected hitting another part?
I am trying to detect when a player is on the ground or not so I made a part that will automatically go below the player's feet and a script I have isn't detecting the part.
Part creation Script:
01 | local brick = Instance.new( "Part" ) |
02 | local root = script.Parent.HumanoidRootPart |
04 | brick.Name = "detector" |
07 | brick.Parent = script.Parent |
08 | brick.CanCollide = true |
10 | brick.CFrame = CFrame.new(Vector 3. new(root.Position.x, root.Position.y - 4.5 , root.Position.z), brick.CFrame.p + root.CFrame.lookVector) |
Part Touched Script (In the part in workspace)
1 | script.Parent.Touched:Connect( function (i) |
It detects other parts but not the part I have under the player.