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

is there a way to show a Frame only once to a new player? (GUI)

Asked by 3 years ago

is there a way to show a gui only once?

0
Just disable the property "ResetOnSpawn" on the ScreenGUI, and make a script which hides the frame when something happens. Ieowyyn 69 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Yes, it is possible. Insert a Script in the ServerScriptService. After that, put the frame inside of that script.

After you're done, open the script and write the following:

local ShowingTime = 7 --Number of seconds you want it to show to the new player
local FrameName = "Frame" --Write the name of the frame you inserted in the script

game.Players.PlayerAdded:connect(function(plr)
    local frame = script:FindFirstChild(FrameName):Clone()
    local GUI_Inserter = Instance.New("ScreenGui", plr.PlayerGui)
    frame.Parent = GUI_Inserter
    wait(ShowingTime)
    GUI_Inserter:Destroy
end)

This will show the frame to every single new player who joins, then it will wait the ShowingTime as in the script. After the ShowingTime is over, the script will automatically remove the frame from the player.

Ad

Answer this question