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

game:GetService("StarterGui"):SetCoreGuiEnabled:(All,false) - only working in solo?

Asked by 10 years ago

So the title explains, the code

game:GetService("StarterGui"):SetCoreGuiEnabled:(All,false)

only works in play solo. I have it in a localscript located inside of a tool. Here is the scripts incase you would like too see it

local player = game.Players.LocalPlayer
local ccam = game.Workspace.CurrentCamera
tool = script.Parent
Equipped = tool.Equipped:connect()
a = player.Character.Head
b = tool.cam


game:GetService('RunService').RenderStepped:connect(function()
    wait()
ccam.CoordinateFrame = CFrame.new(script.Parent.cam.Position, script.Parent.look.Position )
end)

    local function weldBetween(a, b)
    local weld = Instance.new("Weld")
    weld.Parent = a
    weld.Part0 = a
    weld.Part1 = b
    weld.C0 = CFrame.new()
    weld.C1 = b.CFrame:inverse() * a.CFrame
    weld.Parent = a
    return weld;
    end

tool.Equipped:connect(function()
    wait()
game:GetService("StarterGui"):SetCoreGuiEnabled:(All,false)
player.PlayerGui.GUI:Destroy()
    weldBetween(game.Workspace.Part, game.Workspace.Brick)
end)
0
Sorry, shoulve worded that better. I meant that the Title explains my problem jbjgang2 37 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

Like this :

game:GetService("StarterGui"):SetCoreGuiEnabled("All", false)
local player = game.Players.LocalPlayer
local ccam = game.Workspace.CurrentCamera
tool = script.Parent
Equipped = tool.Equipped:connect()
a = player.Character.Head
b = tool.cam


game:GetService('RunService').RenderStepped:connect(function()
    wait()
ccam.CoordinateFrame = CFrame.new(script.Parent.cam.Position, script.Parent.look.Position )
end)

    local function weldBetween(a, b)
    local weld = Instance.new("Weld")
    weld.Parent = a
    weld.Part0 = a
    weld.Part1 = b
    weld.C0 = CFrame.new()
    weld.C1 = b.CFrame:inverse() * a.CFrame
    weld.Parent = a
    return weld;
    end

tool.Equipped:connect(function()
    wait()
    weldBetween(game.Workspace.Part, game.Workspace.Brick)
end)
0
It still dosent work ;( jbjgang2 37 — 10y
0
Remove player.PlayerGui.GUI:Destroy() XToonLinkX123 580 — 10y
Ad

Answer this question