Fall down at a constant speed (dropper game)

like the name’s topic I’m doing dropper game and I added gravity finnaly but when i fall down its going too much fast.
local script inside StarterCharacterScripts

local part = workspace.NormalLobby.TryTheObbyTeleport.ChangingAnimationAndStart.Part
workspace.Gravity = game.ReplicatedStorage.GravityNormal.Value

local debounce = false
local timeout = 0.5

function onTouch(hit)
	local Hum = hit.Parent:FindFirstChild("Humanoid")

	if Hum and hit.Parent.Name == game.Players.LocalPlayer.Name and not debounce then
		debounce = true
		workspace.Gravity = 17				
		--workspace.Gravity /=40
		task.wait(timeout)
		debounce = false
	end
	end

part.Touched:connect(onTouch)

Gravity is just an acceleration value. Acceleration is defined as being the rate of change in a velocity, and velocity is the rate of change in position.

Therefore, if you wanted your character to move at a constant velocity, you’d need to have little to no acceleration (no gravity).

Right now your script is setting the gravity to -17 studs/second on the Y axis, meaning your velocity in the Y direction is going to decrease by 17 studs every second, which is why you go faster as you fall longer.

1 Like

Yea I’m I think I understood that but how I can fix it? is there any way?

The only way I can think of solving this at the moment is adding a VectorForce to the player’s HumanoidRootPart when the part is touched, and then delete it after a certain amount of time.

I have finish part or till die I wanna, I heared of that VectorForce but I cant understand that can you help me with that?

Inside your onTouch function, create two attachments. You can name them attachment0 and attachment1. Set attachment0’s position to hit, and then set attachment1’s position to hit as well, but apply an offset on the Y axis by doing Attachment1.Position = hit.Position + Vector3.new(0, 2, 0). Parent both attachments to “hit”.

After that, create a VectorForce and parent it to hit.

Set VectorForce’s Attachment0 to the attachment we created earlier called “attachment0”, then set Attachment1 to the attachment we named “attachment1”.

Change the VectorForce’s RelativeTo property to Attachment1 (if Attachment1 doesn’t work, change it to Attachment0).

After that, set VectorForce’s Force property to Vector3.new(0, -10, 0). That negative 10 controls how fast you want your hitPart to fall.

If you don’t get the outcome you want, play around with the values and properties a little bit.

Also, check out this video which explains VectorForces and creates an Anti-Gravity effect with it: Anti-Gravity Effect Using VectorForces!

1 Like