Please help! its working perfectly fine one way but as soon as the slope is rotated another way it doesint work!

This is a video of the problem.

Its only working on that one slope rotation.

My only guess is that its not keeping the same y rotation? wich i dont get.

Im not TOO good with cframes so can someone help me?

Heres my code

```
Angle += tGoAng
local redBlock = plrPart
local targetPosition = plrPart.CFrame.Position + downRay.Normal*2
redBlock.CFrame = CFrame.new(redBlock.CFrame.Position, targetPosition)
local rotatedCFrame = CFrame.Angles(math.rad(-90), Angle, 0)
redBlock.CFrame = redBlock.CFrame:ToWorldSpace(rotatedCFrame)
```

Angle is just the Y angle of the plr part.

Yes i did steal this from “Understanding CFrames”

Which is here → Understanding CFrames (roblox.com)

But yeah thats my problem.

What am i doing wrong?