Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make player no gravity?

How to make player no gravity.

Like when you catch the Balloon on Super Mario World.

I maked script like this.

local part = script.Parent
local head = 0.1

part.Touched:connect(function(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player then
		script.Disabled = true
		script.Sound:Play()
		player.Character.Humanoid.HeadScale.Value = 1.1
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.2
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.3
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.4
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.5
		player.Character.Humanoid.Gravity = -2
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.6
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.7
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.8
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.9
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 2
		wait(15)
		player.Character.Humanoid.HeadScale.Value = 1.9
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.8
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.7
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.6
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.5
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.4
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.3
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.2
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1.1
		wait(head)
		player.Character.Humanoid.HeadScale.Value = 1
		player.Cahracter.Humanoid.Gravity = 0
		script.Disabled = false
    end
end)

2 comments

1 answer

I just went into a test world and found a way to do what I think you want to do:

script.Parent.Touched:Connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then local parent = player.Character.HumanoidRootPart local bodyForce = Instance.new("BodyForce") bodyForce.Force = Vector3.new(0, parent:GetMass() * workspace.Gravity, 0) bodyForce.Parent = parent end end)

This discussion is preserved as it was. New answers, comments, and votes are closed.