Suppose u have 1 CFrame. Let this be the original CFrame with 0,0,0.
We have a part that is facing the same CFrame as the original default CFrame of the world.
We roll this part to the side such that the top is facing to the left maybe lets say 25 degrees.
We want to compare the UpVector of the 2 CFrames to get an angle
it’s complicated
function a.IsTilted(part, relativeto)
local cf = CFrame.new( (part.CFrame * CFrame.new(0, 10, 0)).Position )
local cf2 = CFrame.new(part.Position) -- please replace part.Position with relativeto
local x = cf:ToObjectSpace(cf2).X/10
if math.abs(x) > .65 then
else
x = 0
end
return x
end
It’s for my game Downhill Rush idk if you’ve played it but this is going to make the game controls smoother since the game will involve going on inclined slopes.