Recently I've made a game that has a style similar to 2006 - 2010 ROBLOX. I want to make the games jump look similar to Super Nostalgia Zones jump where when they jump, their direction freezes, but they can still jump forward. Here is the jumping script, I just need it to freeze direction on jump and falling. Thanks!
function waitForChild(parent, childName) local child = parent:findFirstChild(childName) if child then return child end while true do child = parent.ChildAdded:wait() if child.Name==childName then return child end end end -- ANIMATION -- declarations local Figure = script.Parent local Torso = waitForChild(Figure, "Torso") local RightShoulder = waitForChild(Torso, "Right Shoulder") local LeftShoulder = waitForChild(Torso, "Left Shoulder") local RightHip = waitForChild(Torso, "Right Hip") local LeftHip = waitForChild(Torso, "Left Hip") local Neck = waitForChild(Torso, "Neck") local Humanoid = waitForChild(Figure, "Humanoid") local pose = "Standing" local toolAnim = "None" local toolAnimTime = 0 -- functions function onRunning(speed) if speed>0 then pose = "Running" else pose = "Standing" end end function onDied() pose = "Dead" end function onJumping() pose = "Jumping" end function onClimbing() pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() pose = "FreeFall" end function onFallingDown() pose = "FallingDown" end function onSeated() pose = "Seated" end function onPlatformStanding() pose = "PlatformStanding" end function moveJump() RightShoulder.MaxVelocity = 0.1 LeftShoulder.MaxVelocity = 0.1 RightShoulder.DesiredAngle = 3.14 LeftShoulder.DesiredAngle = -3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end -- same as jump for now function moveFreeFall() RightShoulder.MaxVelocity = 0.2 LeftShoulder.MaxVelocity = 0.2 RightShoulder.DesiredAngle = 3.14 LeftShoulder.DesiredAngle = -3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end
Please help soon! D:
just turn off the Humanoid.AutoRotate property while the player is in the air, it doesn't have anything to do with animations
you can do this easily by checking the player's FloorMaterial whenever it changes, if the FloorMaterial is air then the player is. well, in the air
-- GetPropertyChangedSignal is better than Changed when you're only checking a single property humanoid:GetPropertyChangedSignal("FloorMaterial"):Connect(function() if humanoid.FloorMaterial == Enum.Material.Air then -- player is in the air, so disable rotation humanoid.AutoRotate = false else humanoid.AutoRotate = true end end)