Heyo Devforum! Recently, I have been making ziplines and balloons. I already have a functional zipline made, but now I am trying to script a balloon. I decided to use somewhat of the same script I had for my zipline, but this time added a body force to make the player float. The only problem is that the force is either too fast, too slow, or it just doesn’t work. Here is my current script:
local debounce = false
script.Parent.Touched:Connect(function(hit)
local balloon = script.Balloon
local holderpart = balloon.Holder
local timeuntilpop = script.Parent.Parent.TimeUntilPop
local animation = script.BalloonHold
if hit.Parent:FindFirstChild("Humanoid") then
if not debounce then
debounce = true
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
local character = hit.Parent
local humanoid = character.Humanoid
local weld = Instance.new("Weld")
weld.Part0 = character.Head
weld.Part1 = holderpart
weld.C1 = CFrame.new(0,-1,0)
weld.Parent = holderpart
holderpart.CFrame = character.Head.CFrame
local loadanimation = humanoid:LoadAnimation(animation)
loadanimation:Play()
local bodyforce = Instance.new("BodyForce", balloon.Sphere)
bodyforce.Force = Vector3.new(0,600,0)
wait(timeuntilpop.Value)
weld:Destroy()
loadanimation:Stop()
bodyforce:Destroy()
debounce = false
end
end
end)
Is there a way that I can make the player float slowly upwards without using body forces?