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 6 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.

local headadmins = {"Harrydamastr"}
local isHint = false
local waitTime = 5
local gui = game.StarterGui[".Joined"].InfoFrame.TextLabel
local frame = game.StarterGui[".Joined"]

game.Players.PlayerAdded:connect(function(player)
    for i, v in pairs(headadmins)do
        local result = nil
        if v == player.Name then
            gui.Text = player.Name.." (Owner/Game Creator) has joined the server."
            frame.Enabled = true
            wait(waitTime)
            frame.Enabled = false
        end
    end
end)

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 — 6y
0
It's working now. Thanks, I'll just have to have Filtering Enabled turned off Harrydamastr 35 — 6y

1 answer

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

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

Ad

Answer this question