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

Gear keeps glitching out?

Asked by
Spoookd 32
8 years ago

I have inserted the "US Military Top Secret Experimental Jetpack" gear from the catalog into the StarterGear but when I am flying in the air, my character turns to the left or right and then glitches out and he keeps turning left to right real quickly. There is an animation called "standstill". I will post parts of the code since there is over 200 lines.

Here is the first part of it:

local Tool = script.Parent

--print(Tool)

--while Tool == nil do
--  Tool = script.Parent
--  wait(.5)
--end

local mass = 0
local player = nil
local equalizingForce = 236 / 1.2 -- amount of force required to levitate a mass
local gravity = .75 -- things float at > 1
local moving = false

local maxFuel = 1000

while Tool == nil do
    Tool = script.Parent
    wait(.5)
end

local currfuel = Tool:FindFirstChild("CurrFuel")
while currfuel == nil do
    Tool = script.Parent
    currfuel = Tool:FindFirstChild("CurrFuel")
    wait(.5)
end

local fuel = Tool.CurrFuel.Value

local gui = nil

local anim = nil

local jetPack = nil

local regen = false

Here is when it first has the animation:

function onEquippedLocal(mouse)

    player = Tool.Parent
    while player.Name == "Backpack" do
        player = Tool.Parent
        wait(.5)
    end

    equipPack()
    mass = recursiveGetLift(player)
    force.P = mass * 10
    force.maxForce = Vector3.new(0,force.P,0)
    mouse.Button1Down:connect(thrust)
    mouse.Button1Up:connect(cutEngine)
    cam = game.Workspace.CurrentCamera
    anim = player.Humanoid:LoadAnimation(Tool.standstill)
    anim:Play()
    gui = Tool.FuelGui:clone()
    updateGUI()
    gui.Parent = game.Players:GetPlayerFromCharacter(player).PlayerGui

    regen = true
    regenFuel()

end
0
Ive been looking and found this model (which is a gear) it works for me is studio, hope it helps https://www.roblox.com/US-Military-Top-Secret-Experimental-Jetpack-GEAR-item?id=31363490 User#5423 17 — 8y
0
It did the same thing. My character starts glitching out. Spoookd 32 — 8y
0
this worked for me, all i did is place it in the workspace. Try a blank project to test. User#5423 17 — 8y
0
I created a new place for it. I can use the gear, but it messes up. You said you placed it in workspace? Did you put it on your character?? Spoookd 32 — 8y

Answer this question