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

Script that shows GUI's not working on servers?

Asked by 6 years ago

Im having problems with Line 11

It works when I do a run on studio but on a regular server it doesnt show the GUI

hp = 50

script.Parent.BillboardGui.Frame.TIMESUP.Text = tostring(hp)

function onTouched(hit)
    if hit.Name == 'RED_Bomb' then
        hp = hp - 1
        script.Parent.BillboardGui.Frame.TIMESUP.Text = tostring(hp)
        script.Parent.Explode:Play()
        if hp == 0 then
            game.StarterGui.ScreenGui.Frame.Visible = true -- Not working?
            script.Parent.Script.Disabled = false
        end
    end
end

script.Parent.Touched:connect(onTouched)
0
What you are trying to do is, Setting the visibility of starter ScreenGui, so only newcomers would see it. thesit123 509 — 6y
0
Ok so I made the frame visible but the background and stuff is just transparent, it still doesnt show up though. Strange thing is when I check the properties of the GUI during a test and it says the frame isnt transparent but I still cant see it MasterKnight555 35 — 6y

1 answer

Log in to vote
1
Answered by
GingeyLol 338 Moderation Voter
6 years ago
Edited 6 years ago

game.StarterGui.ScreenGui.Frame.Visible = true script.Parent.Script.Disabled = false

once the game is played PlayerGui cannot be updated from StarterGui and you would need to get all the players

for i,Players in pairs(game.Players:GetChildren()) do
    Players.PlayerGui.ScreenGui.Frame.Visible = true
end
0
thank u! MasterKnight555 35 — 6y
Ad

Answer this question