Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to move a player up slowly with CFrame?

How would I add onto this code to make it so it would move the player up slowly instead all at once.

for i, player in ipairs(game.Players:GetChildren()) do

player.Character.HumanoidRootPart.CFrame = CFrame.new(0,100,0)

1 answer

✓ Accepted answer
for i, player in ipairs(game.Players:GetPlayers()) do -- use GetPlayers()
	for j = 1, 20 do
		wait(0.5)
		player.Character.HumanoidRootPart.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position + Vector3.new(0, 0.5, 0))
	end
end

If I'm not mistaken, this is what you should be looking for.

6 comments

0

Yeah that's what I was looking for. How would you counter the gravity whilst moving up?

0

lower the gravity

0

Thanks for the help, also the way you sent makes it look really choppy, anyway around this? I already tried lowering the numbers.

0

try messing around with the increment and wait times. I would also recommend using SetPrimaryPartCFrame rather than directly modifying the cframe of the HRP

0

I switched over to BodyVelocity, which seems to work better.

This discussion is preserved as it was. New answers, comments, and votes are closed.