How to make a gravity control for a Sonic Game

Hello everybody so I needed some help with this, so for my sonic game I wanted to make a gravity control just like in this type of video link that I am about to show, and I know that a developer name EgoMoose has made a gravity controller but that’s not what I am looking for basically because it doesn’t have the exact same thing…

For what I need help with is something in this video, so at 0:07 notice how hes using his spindash and run to get up that ramp and when there are no gravity scripts in roblox studio people walk on it the wrong way as you know what I mean. And this video if you wanna see because its the exact thing but he just focuses on this more "the oscillation around a sphere was patched a bit, but it causes issues with cylinders" - YouTube

  1. I want to achieve completing my game so that people can have more experience in it and have fun.
  2. The problem is that I don’t exactly know how to add this in my game and I needed some help.

Link is already sent at the top :arrow_up:

  1. I have tried the gravity controller and that wasn’t exactly what I wanted, as I can not script at all I needed all the help I can get. Like in my other topic - How to add a Falling/Landing sound effect in roblox studio

Thanks for viewing my topic and while im at it, if your helping me get this problem solved could please explain the steps nice and easy so I understand because I haven’t used roblox studio in a while and I forgot somethings.

Either a video or Step - by - Step willl help me out.

6 Likes

Could I get some help please? I really need this to work on my game.

you will need to use body movers for that: BodyMovers

Ok let me check this out, ill see if I find anything, if I don’t I still might need some more help.

You have like some youtube tutorial on how to do this because videos from a few years ago the scripts may not work anymore.

there is a lot here:

Was this the script I had to put inside the part, cause I used BodyVelocity should I be using that?

local bv = script.Parent.BodyVelocity
while true do
	bv.Velocity = Vector3.new(10,0,0)
	
	wait(1)
	
	bv.Velocity = Vector3.new(-10,0,0)
	wait(1)
	
end
1 Like

yea this script seem fine you can use it

Ok but did you watch the video i sent in the top of the topic? Because thats what I’m trying to do

Can you at least make a video on how to do it, and could you use a sphere like he did in the devlog?

I sent a new video link and here it is "the oscillation around a sphere was patched a bit, but it causes issues with cylinders" - YouTube

You will really need to use ego moose stick gravity that what he uses in the video like he does humanoid.Running:Connect(function(speed) he check its speed then if its speed is huge then stick the character to the wall if not then it will fall

1 Like

Can you send me a link of his video please, but what about the when you jump off?!? you still stick to it and you can’t jump off, thats why i don’t want to use his gravity controller

you can jumpoff and cancel it like this script:

humanoid.Jumping:Connect(function(isActive)
 print("Jumping: ", isActive)
 end)

here is some more info Humanoid.Jumping

I saw it and it doesn’t seem to be working i followed the steps but didnt work, could you record a video of it so I fully understand what to do if you can.

by the looks of it, it seems like you’re just asking him to make a script for you. That’s not how it works, this is for asking for HELP on doing it, not by somebody giving you a script for it. I recommend having initial knowledge on something like this instead of asking for others to do it

I’m gonna bump up this topic because I’m interested in creating this (or for someone else to create it). How would you check the speed of the humanoid using this function ( humanoid.Running:Connect(function(speed) )? My scripting knowledge is kinda small, so I’m confused. I tried doing this: Screenshot (1869)

but as I said, my scripting knowledge is small, so this could be VERY wrong. Any ideas?

1 Like

I also tried doing this:

but that doesn’t seem to work either. Can anyone tell me what I’m doing wrong?

when you are using this humanoid.Running:Connect(function(speed)
the speed parameter is the real speed velocity(i think) of which the humanoid is moving. so it wont work if you are putting humanoid.WalkSpeed as it just a fixed value which determine the velocity the player will be moving so you should put it like this

humanoid.Running:Connect(function(speed)
if speed <= 50 then return end

if Controller then
        Controller:Destroy()
        Controller = nil
else
         Controller = GravityController.new(PLAYERS.LocalPlayer)
          Controller.GetGravityUp = GetGravityUp
end)

Hey there. I have seen this post and I just wante to share some thoughts.

I created a similar system a year ago.
https://www.roblox.com/games/refer?IsLargeGameTile=false&PageType=GameSearch&PlaceId=6692726430&Position=1&LocalTimestamp=2021-08-15T11:16:17.111Z
What I learned is that it is that Humanoid are incredibly limiting.

I don’t actually use Humanoids for movement. I use the server to ray ast downward and find the correct orientation. Rotate then move the character according. When moving I make sure the character is flat to the ground.

I use constraints in the newer version to make it smoother.

In otherwords if I were you I would make a new Character Controller that can accommodate something like that.

or just use the Egomooses Gravity Controller if you wish.

1 Like