Forum > Scripts >

Make da players float

Posts: 19

Threads: 7

Joined: Mar, 2018

Reputation: 0

Posted

function floatPlayer(player)
 if player and player.Parent then
 Â local character = player.Character
 Â if character and character.Parent then
 Â Ã‚ local humanoidRootPart = character:FindFirstChild('HumanoidRootPart')
 Â Ã‚ if humanoidRootPart then
 Â Ã‚ Ã‚ local floatForce = humanoidRootPart:FindFirstChild('FloatForce')
 Â Ã‚ Ã‚ if not floatForce then
 Â Ã‚ Ã‚ Ã‚ floatForce = Instance.new('BodyForce')
 Â Ã‚ Ã‚ Ã‚ floatForce.Name = 'FloatForce'
 Â Ã‚ Ã‚ Ã‚ floatForce.Parent = humanoidRootPart
 Â Ã‚ Ã‚ end
 Â Ã‚ Ã‚ local mass = 0
 Â Ã‚ Ã‚ for _,part in pairs(character:GetDescendants()) do
 Â Ã‚ Ã‚ Ã‚ if part and part:IsA('BasePart') then
 Â Ã‚ Ã‚ Ã‚ Ã‚ mass = mass + part:GetMass()
 Â Ã‚ Ã‚ Ã‚ end
 Â Ã‚ Ã‚ end
 Â Ã‚ Ã‚ floatForce.Force = Vector3.new(0,mass*.8*workspace.Gravity,0)
 Â Ã‚ end
 Â end
 end
end
wait(2)
for _,player in pairs(game.Players:GetPlayers()) do
 floatPlayer(player)
end
  • 0

Posts: 8

Threads: 0

Joined: Apr, 2018

Reputation: 0

Replied

:O IT FALL SLOWER ITS SO COOL THX
  • 0

Users viewing this thread:

( Members: 0, Guests: 2, Total: 2 )