How can I make a player levitate into the air?

I’m trying to make it so a player floats upwards in the air for some time. I have tried using tweenservice but the humanoid root part apparently does not have a value for Position. I have also tried changing the players gravity to -20 using a remote event to a local script. All I want is for one particular player to levitate into the air.

game.Players.PlayerAdded:Connect(function(player)
	player.Chatted:Connect(function(message)
		if message == "Breath Air" or "BREATH AIR" or "breath air" then 
			local Sound = game:GetService("ServerStorage").SoundEffects.DeepBreath:Clone()
			Sound.Parent = player.Character.PrimaryPart
			Sound:Play()
			task.wait(1)
			local tween = TweenService:Create(player.Character:FindFirstChild("UpperTorso"), info, goals)
			tween:Play()
			task.wait(1)
			Sound:Stop()
			Sound:Destroy()
			-- make player levitate into air like a hot air balloon
			task.wait(5)
			player.Character:FindFirstChild("Humanoid").Health = 0
			end
	end)
end)

ignore my script it isn’t optimised since this is just for messing around

You can show the entire script? I see some values that aren’t shown there (like for example: info and goals)

1 Like

You can use linear velocity to levitate the player

local Rootpart = char.HumanoidRootPart
local linearvelocity = Instance.new("LinearVelocity",Rootpart)
local attachment = Instance.new("Attachment",Rootpart) 
linearvelocity.MaxForce = math.huge
linearvelocity.Attachment0 = attachment
linearvelocity.VectorVelocity = Vector3.new(100,0,0)
task.wait(1)
linearvelocity:Destroy()
2 Likes

they weren’t really needed to make this work

alright thank you I’ll try using this!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.