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

Why won't the script create the screengui in my players player gui?

Asked by
Prioxis 673 Moderation Voter
10 years ago

I already asked a question about this but it went unanswered

heres my code:

game.Players.PlayerAdded:connect(function(plr)
plr:WaitForChild("PlayerGui")
local gui = Instance.new("ScreenGui")
gui.Parent = plr.PlayerGui
    gui.Name = "Main"
    wait(1)
    local frame = Instance.new("Frame")
    frame.Parent = gui
    wait(1)
    local Text = Instance.new("TextLabel")
    Text.Parent = gui
    Text.Name = "Load"
    wait(5)
    plr.PlayerGui.Main.Load.Visible = true
    wait(0.1)
    plr.PlayerGui.Main.Load.Text = "[Loading] 7%"
    wait(0.5)
        plr.PlayerGui.Main.Load.Text = "[Loading] 13%"
    wait(0.3)
        plr.PlayerGui.Main.Load.Text = "[Loading] 20%"
    wait(0.5)
    plr.PlayerGui.Main.Load.Text = "[Loading 27%"
    wait(0.3)
    plr.PlayerGui.Main.Load.Text = "[Loading] 33%"
    wait(0.5)
    plr.PlayerGui.Main.Load.Text = "[Loading] 40%"
    wait(0.3)
        plr.PlayerGui.Main.Load.Text = "[Loading] 47%"
    wait(0.5)
    plr.PlayerGui.Main.Load.Text = "[Loading] 53%"
    wait(0.3)
    plr.PlayerGui.Main.Load.Text = "[Loading] 60%"
    wait(0.5)
        plr.PlayerGui.Main.Load.Text = "[Loading] 67%"
    wait(0.3)
        plr.PlayerGui.Main.Load.Text = "[Loading] 74%"
    wait(0.5)
    plr.PlayerGui.Main.Load.Text = "[Loading] 83%"
    wait(0.3)
        plr.PlayerGui.Main.Load.Text = "[Loading] 95%"
    wait(0.5)
    plr.PlayerGui.Main.Load.Text = "[Loading] 100%"
    wait(0.3)
    plr.PlayerGui.Main.Load.Text = "Loading Complete!"
    wait(0.5)
        plr.PlayerGui.Main.Load.BackgroundTransparency = 0.2
    wait(0.1)
        plr.PlayerGui.Main.Load.BackgroundTransparency = 0.4
    wait(0.1)
        plr.PlayerGui.Main.Load.BackgroundTransparency = 0.6
    wait(0.1)
    plr.PlayerGui.Main.Load.BackgroundTransparency = 0.8
    wait(0.1)
        plr.PlayerGui.Main.Load.BackgroundTransparency = 1
    wait(0.1)
        plr.PlayerGui.Main.Load.Text = ""
    wait(0.1)
    plr.PlayerGui.Main.Load:remove()
    wait(0.1)
    game.ServerStorage.Team:Clone().Parent = plr.PlayerGui
end)
0
No errors are in the output just the script doesn't do anything Prioxis 673 — 10y
0
Is this in a local script? iluvmaths1123 198 — 10y
0
yes Prioxis 673 — 10y
0
That was the problem i changed it to a regular script and now it works except the textlabel is invisible it seems Prioxis 673 — 10y

2 answers

Log in to vote
0
Answered by 10 years ago

Sorry, but I couldn't comment :(

I think the problem is because Text is not scaled/sized, and it makes it hard to see.

0
oh yeah thank you Prioxis 673 — 10y
0
can you vote as correct answer? or upvote my rep? Basscans 60 — 10y
Ad
Log in to vote
0
Answered by
TopDev 0
10 years ago

Well, you did have alot of errors.

Now all you pretty much have to do is position the gui's correctly. Here's the fixed script.

game.Players.PlayerAdded:connect(function(plr)
plr:WaitForChild("PlayerGui")
local gui = Instance.new("ScreenGui", plr.PlayerGui)
    gui.Name = "Main"
    wait(1)
    local frame = Instance.new("Frame", gui)
    wait(1)
    local Lab = Instance.new("TextLabel", frame)
    Lab.Name = "Load"
    wait(5)
    plr.PlayerGui.Main.Frame.Load.Visible = true
    wait(0.1)
    plr.PlayerGui.Main.Frame.Load.Text = "[Loading] 7%"
    wait(0.5)
        plr.PlayerGui.Main.Frame.Load.Text = "[Loading] 13%"
    wait(0.3)
        plr.PlayerGui.Main.Frame.Load.Text = "[Loading] 20%"
    wait(0.5)
    plr.PlayerGui.Main.Frame.Load.Text = "[Loading 27%"
    wait(0.3)
    plr.PlayerGui.Main.Frame.Load.Text = "[Loading] 33%"
    wait(0.5)
    plr.PlayerGui.Main.Frame.Load.Text = "[Loading] 40%"
    wait(0.3)
        plr.PlayerGui.Main.Frame.Load.Text = "[Loading] 47%"
    wait(0.5)
    plr.PlayerGui.Main.Frame.Load.Text = "[Loading] 53%"
    wait(0.3)
    plr.PlayerGui.Main.Frame.Load.Text = "[Loading] 60%"
    wait(0.5)
        plr.PlayerGui.Main.Frame.Load.Text = "[Loading] 67%"
    wait(0.3)
        plr.PlayerGui.Main.Frame.Load.Text = "[Loading] 74%"
    wait(0.5)
    plr.PlayerGui.Main.Frame.Load.Text = "[Loading] 83%"
    wait(0.3)
        plr.PlayerGui.Main.Frame.Load.Text = "[Loading] 95%"
    wait(0.5)
    plr.PlayerGui.Main.Frame.Load.Text = "[Loading] 100%"
    wait(0.3)
    plr.PlayerGui.Main.Frame.Load.Text = "Loading Complete!"
    wait(0.5)
        plr.PlayerGui.Main.Frame.Load.BackgroundTransparency = 0.2
    wait(0.1)
        plr.PlayerGui.Main.Frame.Load.BackgroundTransparency = 0.4
    wait(0.1)
        plr.PlayerGui.Main.Frame.Load.BackgroundTransparency = 0.6
    wait(0.1)
    plr.PlayerGui.Main.Frame.Load.BackgroundTransparency = 0.8
    wait(0.1)
        plr.PlayerGui.Main.Frame.Load.BackgroundTransparency = 1
    wait(0.1)
        plr.PlayerGui.Main.Frame.Load.Text = ""
    wait(0.1)
    plr.PlayerGui.Main.Frame.Load:remove()
    wait(0.1)
    game.ServerStorage.Team:Clone().Parent = plr.PlayerGui
end)

0
i Actually don't need the script anymore thank you though but I found a different way to do this Prioxis 673 — 10y
0
No problem. TopDev 0 — 10y

Answer this question