I'm certain this is not an easy thing to do; however, I have to ask (as it is very important to the game I'm trying to develop).
Is there any way to get the orientation/rotation of the surface a character is standing on? In short, I have scripts that fire parts straight out of a players torso, but if they are standing on an incline or something, they just go into it rather than upwards/downwards (parallel to the surface). Is there some way to do this? If so, I would greatly appreciate it!
Thanks in advance!
You can raycast below a character to figure out what part, position, normal, and material. You can use the normal or the part's CFrame and/or Orientation properties to determine the angles and whatnot.
Here is a video on Reflecting raycasting. Although this is not what you are looking for, it provides a visualization of what the normal is and can possibly help you with your fire parts:
Good luck!
This code will see whats the player is touching and look at its orientation
local UsingR15 = true game.Player.PlayerAdded:Connect(function(p) p.CharacterAdded:Connect(function(char) if UsingR15 then char.LowerRightFeet.Touched:Connect(function(blocktouching) char.LowerLeftFeet:Touched:Connect(function(IDontLikeWorkingWithFeet) if blocktouching == IDontLikeWorkingWithFeet then print(tostring(blocktouching.Orientation)) end end) end) end else char.['Right Leg']Touched:Connect(function(blocktouching1) char['Left Leg']:Touched:Connect(function(IDontLikeWorkingWithFeet1) if blocktouching1 == IDontLikeWorkingWithFeet1 then print(tostring(blocktouching1.Orientation)) end end) end) end end) end)