Wrong Hoverboard Orientation

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I want to create an Hoverboard(Sky Surfer) that the character can ride and fly with in the sky. the hoverboard must have the same X orientation as the CurrentCamera.

  1. What is the issue? Include screenshots / videos if possible!

The hoverboard’s X orientation is wrong

What is happening:
robloxapp-20240217-1906015.wmv (1.2 MB)

What I want:
robloxapp-20240217-1909270.wmv (1.9 MB)

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I watched a lot of videos on youtube and other social media platforms. I also asked multiple AIs with no solution.

Here is the code that should rotate the board to have the same X orientation as the camera:

	if Flying.Value == true then
		local camRotX, camRotY, camRotZ = Camera.CFrame:toEulerAnglesXYZ()
		local AORotX,AORotY,AORotZ = AlignOrientation.CFrame:ToEulerAnglesXYZ()
		local newCFrame = CFrame.fromEulerAnglesXYZ(AORotX,AORotY,camRotZ + math.rad(180))
		
		AlignOrientation.CFrame = newCFrame
	end
end)

i can provide more info if needed( sorry for bad english btw)

could you provide a video of a different file format or one that doesn’t require downloading? I can’t open the video with that format.

I would assume the issue is that the hoverboard is facing the wrong way? If so, it might be helpful to make sure that the hoverboard model itself is facing the way you think it is when it is at a certain angle. It might be that the model itself has a different orientation then you think.

yep that was the problem thank you so much. i had to remove the “+ math.rad(180)” too. Sorry for the video format its my first time making a topic

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.