Tweening character not working

So I’m trying to make the entire players character tween to a part without bugging and its not working, any help? (its on a local script to reduce lag)

	local hrp = game.Players.LocalPlayer.Character.HumanoidRootPart
	local hum = game.Players.LocalPlayer.Character.Humanoid
	local moveto = game.Workspace.RESET.UNIVERSE
	local TweenService = game:GetService("TweenService")

	local goal = {}
	goal.Position = moveto.Position

	local tweenInfo = TweenInfo.new(5)

	local tween = TweenService:Create(hrp, tweenInfo, goal)

	tween:Play()
	hum.WalkSpeed = 0
	hum.JumpPower = 0
	game.Workspace.Gravity = 0
	local things = game.Players.LocalPlayer.Character:GetDescendants()
	for index, descendant in pairs(things) do
		if descendant:IsA("BasePart") then
			descendant.CanCollide = false
		end
	end
end)

Are you trying to move a character??

Yeah. Every time the event fires it just bugs out and the character goes flying and the camera just goes where ever it wants.

Well don’t use tween here, use humanoid:MoveTo(position)

for example.

  local player = game.Players.LocalPlayer
  local character = player.Character or player.CharacterAdded:Wait()

  if character then
    local part = game.workspace.Part -- part where you want the character to move.
    character.Humanoid:MoveTo(part.Position)
  end

The thing is its in the air and its supposed to be like they are floating to it. They also aren’t supposed to be able to move during it.

If they are in air, then you can add invisible path below and to make them not movable you can set there walkspeed to 0

I learnt recently that while using functions such as tween and body position you have to enable the platformstand option under the humanoid of a player, When you do that the default character script seems to NOT work and the player assumes a flying stance. I have not personally experimented with this (since it was not needed for me) , but i believe that’s how it’s done.

(Sorry for the vague info, if you have any more questions i would love to help!)

1 Like

I’ve figured it out after a bit of time, It made absolutely no sense on how that one didn’t work but how my improved one worked.

I basically just messed around with how the tween plays and it worked.
Weird. Thanks for the help though, even though I already solved it.

(i also anchored the humanoidrootpart)

1 Like

You can temporarily anchor the HumanoidRootPart. This will prevent the player from moving and also make your Tween work correctly. Just setup the properties dictionary to include CFrame with its destination set to where you’d like the Character to “float” to. If you want it to follow a path this isn’t just linear, you can put that process in a loop where you progress through a table of destinations. Remember to unanchor the HumanoidRootPart after the final Tween is complete (if you’d like the Player to be able to move again!)