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

Plane GUI problom?

Asked by 10 years ago

The GUI in the plane that I use not working any more I think its problem with the Mouse Icon GUI its a GUI that is suppose to replace the Mouse Icon,and It is linked with the controls and they dont work eather,so If anyknows how to fix this problem please contact me on my roblox account its bosetroller.The tools works in studio test mode but not in online mode,anything wrong with this script?

local object = Instance.new("ObjectValue") object.Value = script.Parent.Parent.Parent

seat = script.Parent.Seat

function onSitUp(child, hopper, plane)

if child.Parent == nil then
    PS = hopper.Parent.Parent.PlayerGui:findFirstChild("PlaneStats")
    if PS ~= nil then PS:remove() end
    hopper.Parent = nil
end

end

function onChildAdded(part) if part.className == "Weld" then

    local HumanoidRootPart = part.Part1
    if HumanoidRootPart ~= nil then

        local char = HumanoidRootPart.Parent
        local player = game.Players:GetPlayerFromCharacter(char)
        if player ~= nil then
            local regen = script.Parent.Regen
            regen.Anchored = false
            local hopper = game.Lighting.FA18E:clone()
            hopper.Parent = player.Backpack
            hopper.Name = "F/A-18E Super Hornet"
            part.AncestryChanged:connect(function(child) onSitUp(child, hopper, script.Parent.Parent) end) 
        end

        local parent = HumanoidRootPart.Parent
        if parent ~= nil then
            script.Parent.Parent.Parent = parent
            while true do
                wait(2)
                if part == nil then
                    script.Parent.Parent.Parent = game.Workspace
                    script.Parent.Parent:MakeJoints()
                break end
            end
        end
    end
end

end seat.ChildAdded:connect(onChildAdded)

Answer this question