I'm trying to find out if there is a way to detect what side of a brick you hit. I'm sure I'm going about this completely wrong and the code posted below will not work. The overall goal was to make it so when the back of a player was hit, it would deal damage. There isn't really a way to reference a hit's Surface though is there?
enabled = true function onTouch(hit) if hit.Parent == nil then return end if enabled == true then if hit.Parent:FindFirstChild("Humanoid") and hit.Surface == "BackSurface" then enabled = false hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 10 end end end