so, i know that bodyposition is depreciated, but i was wondering, what would i use instead to move the player up into the air, about 30 studs above their current position, and have them stay there for about half a second, then drop back down?
i’ve already tried MoveTo(), but that doesn’t really go into the air very well.
Despite what people try and say, the BodyMovers still are the best way to do a lot of things. Attachment movers are nice but they behave a lot differently
BodyMovers are fine, but if you really insist try using the attachment version
it doesn’t move the player at all. im unsure if im doing anyyhing wrong, but it will not move the player upwards at all.
local function align(player)
local character = player.Character or player.CharacterAdded:Wait()
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if humanoidRootPart then
local alignPosition = Instance.new("AlignPosition")
alignPosition.Parent = humanoidRootPart
alignPosition.ApplyAtCenterOfMass = true
alignPosition.MaxForce = 10000
alignPosition.MaxVelocity = 50
alignPosition.ReactionForceEnabled = false
alignPosition.Responsiveness = 200
alignPosition.Position = humanoidRootPart.Position + Vector3.new(0, 30, 0)
end
end
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input, istyping)
if istyping then
return
end
if input.KeyCode == Enum.KeyCode.E then
align(game.Players.LocalPlayer)
print("aligning")
end
end)
should i use something else instead, or did i write something wrong?
Do not follow anyone’s advice in this thread telling you to use BodyMovers. It is totally not recommended by Roblox, and at the same time even in other developing environments it isn’t either. Universally you shouldn’t be using deprecated things.
ok, i tried using linear velocity to move players, but it just seems to knocks them over, and sometimes teleport them a few studs away. it’s awfully buggy. is there an easy way to fix this, or should i use something else?
It shouldn’t be used, it will go away soon, and you will have to change your system up or in some cases entirely rewrite it. Use AlignPosition, it’s identical and safer.
Exactly it is to annoying when people say “no its deprecated” I do not care it is still more faster in physics and you can just add debris to it for a knockback or something. Roblox deprecated bodymovers and r6 now even, yet DO THEY STILL WORK? YES. ARE THEY PRIMARILY USED FOR MOST GAMES? YES.
no deprecated feature has “gone away” it is still insertable in scripts.
same with alignposition or switching to any other instance. just embrance the fact that my main POINT is backed-up by edvidence that is it faster in physics. that’s what this argument is about, not about rewriting some parts of the code.
I wasn’t meaning for this to be a debate, and I understand it’s faster, it’s just that newer version of Roblox may not be compatible with it, they are no longer updating it. Most likely it will break.
it will only break with the updates of games from developers, roblox probably wont break it themselves. Although if you can recall features that have been broken by roblox updates that would be good.
BodyMovers have totally different behaviour in my experience like pivoting on the attachment when it was detrimental to what i was doing
Roblox really deprecated them just to push the new attachment ones
They wont be removed for the next 20 years (Messages have been deprecated for a looong time and are still here)