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)
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)
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.
6 comments
Yeah that's what I was looking for. How would you counter the gravity whilst moving up?
lower the gravity
https://developer.roblox.com/api-reference/property/Workspace/Gravity
Thanks for the help, also the way you sent makes it look really choppy, anyway around this? I already tried lowering the numbers.
try messing around with the increment and wait times. I would also recommend using SetPrimaryPartCFrame rather than directly modifying the cframe of the HRP
I switched over to BodyVelocity, which seems to work better.