Code Review of a Boat Seat with the attempt of doing GUI based thrusters

(Was not sure if this should be in Code Review or Scripting Support)
I’d appreciate your response with the correct code if you fancy in doing so :slightly_smiling_face:
Overview:
So what I’m trying to do is get it so if a user clicks a button it will fire a remote event to make a boat seat go right, I’ve made a remote event and it works however, it will always go right if it’s facing the X axis. So if you turn it, facing the other way it will go forward along the X Axis when I’m intending for it to act like Thrusters either Right or Left where the Seat will go right or go left no matter what way it is facing here is what I tried;

--Thrusters--
game.Workspace.BoatRecievers.BTRight.OnServerEvent:connect(function()
	--script.Parent.BodyGyro.cframe = script.Parent.BodyGyro.cframe * CFrame.fromEulerAnglesXYZ(0,-.045,0)
	script.Parent.Parent.Driving.Value = true
	script.Parent.Parent.Right.Value = false
	script.Parent.Parent.Left.Value = false
	script.Parent.Parent.BTRight.Value = true
	script.Parent.Parent.BTLeft.Value = false
	print("RightThrust")
	script.Parent.BodyVelocity.Velocity = Vector3.new(0.5,0,0)
end)

game.Workspace.BoatRecievers.BTLeft.OnServerEvent:connect(function()
	print("LeftThrust")
	--script.Parent.BodyGyro.cframe = script.Parent.BodyGyro.cframe * CFrame.fromEulerAnglesXYZ(0,-.045,0)
	script.Parent.Parent.Driving.Value = true
	script.Parent.Parent.Right.Value = false
	script.Parent.Parent.Left.Value = false
	script.Parent.Parent.BTRight.Value = false
	script.Parent.Parent.BTLeft.Value = true
	script.Parent.BodyVelocity.Velocity = Vector3.new(-0.5,0,0)
end)
1 Like