Best way of detecting wall collision?

What’s the best way of detecting wall collision? basically when I wanna make cool combos and stuff, I wanna detect if a player hits the ground or not. And I wanna know what’s the best way of detecting this collision? Do I have to put the assets that I want the player to collide with in a certain folder and use some sort of a if statement or do you guys suggest any better methods that you may have or use

1 Like

Well, based off what you said and what I understood from it. For this you would want to use the .Touched event. Basically, you can have a part that you want the player’s Character to touch or you can set it to the “Floor”.

For example:

workspace.FloorPart.Touched:Connect(function(hit)

Then to make sure it is the Player’s Character touching you would want to add this into the script.

if hit.Parent:FindFirstChild("Humanoid") then

Then you can add your combos or whatever you’d like after the player hits.

If you dont implement some sort of cool down or self destruct with .Touched you’ll have the player standing on the part for a second and the event will trigger 50 times at most :joy:

I’d try use BasePart:GetTouchingParts which you can read on over here: BasePart | Documentation - Roblox Creator Hub

Hope this helps!

What @b_oolean said is true, I assumed that maybe the player wasn’t touching the ground or that they had another surface to stand on?

If they are on the part for the entire game then you will have to use BasePart:GetTouchingParts, as @b_oolean provided.

I think a good method would be Region3, Kinda complicated first time to understand, but it would be really good.