Difficulty Chart Elevator Very Buggy

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I have an elevator for my Difficulty chart obby (based off of the one in Tiny’s Difficulty Chart Obby Remastered

  2. What is the issue? Include screenshots / videos if possible!
    The issue is that the elevator looks very weird and is very buggy. (See GIF below, sorry for the lag)

GIF of the buggy elevator

Script:

local de = false
script.Parent.Touched:Connect(function(hit)
	if de == false then
		de = true
		local char = hit.Parent
		if char:FindFirstChild("HumanoidRootPart") then
			local hRoot = char:FindFirstChild("HumanoidRootPart")
			hRoot.Position = Vector3.new(hRoot.Position.X, hRoot.Position.Y + 1, hRoot.Position.Z)
		end
		de = false
	end
end)
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    No, I can’t think of any solutions.

Change the Y interval from + 1 to + 0.1 or + 0.05 .Making the elevator move one stud makes it look buggy so try increasing the Y by a lower value.

1 Like

The elevator is still very buggy with either 0.1 and 0.05. I also tried setting the Humanoid’s Jump property to true, but that didn’t work either.

How about adding a body velocity instead?

Add delay to the debounce maybe it can help a bit

I don’t know how a BodyVelocity works, could you explain?

I will try adding a delay, and edit this if it works.
Edit: The delay did not work :frowning:

I hate to be a pain but could someone upload the gif elsewhere? It’s not loading for me :sweat:

You can try to tween the elevator or the player itself

A BodyVelocity is basically a Velocity object that can move a part relative to physics

It would be considered a better approach instead of just moving the Character’s HumanoidRootPart Position, or better yet you can use TweenService to tween the Character’s Position that way

1 Like

Here is a Google Drive link to the video version: (It’s still processing, so it’ll take a second)

1 Like

How would I tween the position of the character? I couldn’t get the BodyVelocity to work as the character falls right through the part.

One Instance that I see is that there’s literally no cooldown when you’re attempting to change the Position of the HRP

local de = false

script.Parent.Touched:Connect(function(hit)
	if de == false then
		de = true
		local char = hit.Parent
		if char:FindFirstChild("HumanoidRootPart") then
			local hRoot = char:FindFirstChild("HumanoidRootPart")
			hRoot.Position += Vector3.new(0, 1, 0)
		end
        wait(5)
		de = false
	end
end)

Also you’re moving the HRP’s Position very small, shouldn’t you be moving the Elevator Part instead like you mentioned before? Cause I don’t exactly see a “Elevator” to move

I don’t quite understand what you are saying…

I’m referring to these in your OP, unless if you meant to move the Character itself?

I am trying to move the character, like the one in Tiny’s Difficulty Chart Obby

Clip of what I am going for:

This is possibly due to the fact that the Humanoid’s State keeps changing back to Jumping every time the Character touches the part (Looking at the video here)

What you could do, is make the Character jump again after a certain interval of seconds have passed

local de = false

script.Parent.Touched:Connect(function(hit)
	if de == false then
		de = true
		local char = hit.Parent
		if char:FindFirstChild("HumanoidRootPart") then
			local hRoot = char.HumanoidRootPart
			local Humanoid = char.Humanoid
            Humanoid.JumpPower = 75
            Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
            wait(1)
            Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
            Humanoid.JumpPower = 50
		end
        wait(5)
		de = false
	end
end)

I tried using that script, however the character still just falls through the part.

You’ll probably need to keep forcing the Humanoid every time they touch the part then

local de = false

script.Parent.Touched:Connect(function(hit)
	if de == false then
		de = true
		local char = hit.Parent
		if char:FindFirstChild("HumanoidRootPart") then
			local hRoot = char.HumanoidRootPart
			local Humanoid = char.Humanoid
            Humanoid.JumpPower = 75
            Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
		end
        wait(0.5)
		de = false
	end
end)