Body Gyro help?

You can write your topic however you want, but you need to answer these questions:
I am currently trying to get the body gyro to cframe my whole body looking upwards and stay that way

The issue is absolutely nothing happens at all

I have tried setting the power to math.huge which flung me, but seems that any power below that has no effect

this isnt the whole script but everything is tagged correctly, no errors,etc

val:GetPropertyChangedSignal("Value"):connect(function()
	if val.Value == true then
		coroutine.resume(coroutine.create(function()
			while wait() do
				local der = hr:findFirstChild("Velocity")
			if val.Value == true and not der and targ.Value == nil then
				local move = Instance.new("BodyPosition",hr)
				move.Name = "Velocity"
				local pos = Instance.new("BodyGyro",hr)
				pos.P = 50000
				pos.CFrame = CFrame.new(hr.CFrame.UpVector)
					end
			if val.Value == true and der and targ.Value == nil then
				local findwalkpos = Ray.new(hr.Position,hr.CFrame.LookVector*5)
				local hit, pos = workspace:FindPartOnRayWithIgnoreList(findwalkpos,{char})
				if not hit then
					elseif hit then
					
					end
				
				elseif val.Value == false then
					
					
					end
				end
			end))
	elseif val.Value == false then
			print("no rays bro")
	end
end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

I am trying to do wall walking and this is the first thing I need to accomplish at the moment.

What is the gyro’s max torque? That is what you should be changing, not the power.

Its 400000, 0, 400000 the regular max torque when inserted, I also read some-where ill have to put the humanoid in platform stand correct?

As in set the platformstand property to true*

Well, I just tried it, and the behavior seems unusual. Setting the state to PlatformStand did nothing, but setting it to Physics worked.

I feel like they have been making some changes. BodyGyros as I recall default at 4000,0,4000 max torque, so I’m not sure whats going on.

i changed the line of code with this and this is the result i got which is close but not quite what i need
pos.CFrame = CFrame.new(hr.Position,hr.CFrame.UpVector*900)
i also made maxtorques xyz all math.huge this is the result
https://gyazo.com/a22ae69427cef2e2537a83c23121630b/

hes looking up but im needing him to rotate looking up only on the y axis i believe it is.

So the issue with upward vectors is that they kind of bug out. Theres no forward reference, so you’ll need to use a different method for getting the upward CFrame.

Try setting the gyro’s CFrame to this.

local A = HumanoidRootPart.CFrame.LookVector
local B = Vector3.new(0,1,0)

local Angle = math.acos( A:Dot(B)/(A.Magnitude * B.Magnitude) )

local GyroCFrame = HumanoidRootPart.CFrame * CFrame.Angles(math.rad(Angle),0,0)

I haven’t tested it myself. You might need to change the X axis of Angles to the Z axis.

1 Like

I meant the x axis, but i fixed it the solution was
pos.CFrame = hr.CFrame * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)