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

GUI won't disappear after wait()?

Asked by 7 years ago

Hi.

I have no idea why this script will not work. It works completely fine, but will not disable after my waitTime, which is 5 seconds.

01local headadmins = {"Harrydamastr"}
02local isHint = false
03local waitTime = 5
04local gui = game.StarterGui[".Joined"].InfoFrame.TextLabel
05local frame = game.StarterGui[".Joined"]
06 
07game.Players.PlayerAdded:connect(function(player)
08    for i, v in pairs(headadmins)do
09        local result = nil
10        if v == player.Name then
11            gui.Text = player.Name.." (Owner/Game Creator) has joined the server."
12            frame.Enabled = true
13            wait(waitTime)
14            frame.Enabled = false
15        end
16    end
17end)

The script location is in game.ServerScriptService and it is a normal script, and Filtering Enabled is on. I've tried putting it in a LocalScript and moving the location of the script to somewhere else, but no luck.

0
Try turning off FE and see whether it works or not xXRobloxRobloxianXx 15 — 7y
0
It's working now. Thanks, I'll just have to have Filtering Enabled turned off Harrydamastr 35 — 7y

1 answer

Log in to vote
0
Answered by
imaski4 42
7 years ago

do frame.Visible = false it would be easier ;)

Ad

Answer this question