Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I remove its gravity?

Asked by 9 years ago
01wait(1)
02 
03local player = game.Players.LocalPlayer
04local Mouse = player:GetMouse()
05local humanoid = player.Character.Humanoid
06local s = humanoid:LoadAnimation(game.StarterPack.Fireball.Animation)
07 
08Player = script.Parent.Parent 
09Character = Player.Character
10Mouse = Player:GetMouse() 
11usable = true
12debounce = false
13 
14function onKeyDown(key)
15    if debounce == false then
View all 67 lines...

I tried to use BodyForce, I put it on 0,0,0 to give it 0 gravity so the brick won't spawn under the terrain I'm standing on. But the brick still has gravity and still spawns under the terrain. How do I fix?

1 answer

Log in to vote
3
Answered by
P100D 590 Moderation Voter
9 years ago

First of all, you might want to set the part's position manually. "Removing gravity" on the part won't stop it from spawning under the terrain.

Second, setting a BodyForce of 0,0,0 does literally nothing. What you need to do is have the BodyForce push upwards to counter gravity. Here's what you're going to have to set it to:

1--Make sure to define BodyForce and part first
2BodyForce.force = Vector3.new(0, 196.2, 0) * part:GetMass()
Ad

Answer this question