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

I need a script that loads a gui for a certain player when he joins the game. Do you have one? [closed]

Asked by 5 years ago

Please help me get one.

Closed as Not Constructive by Prestory, Lugical, and iDarkGames

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
ew098 0
5 years ago
Edited 5 years ago

You can do this by doing this:

local Player = game.Players.LocalPlayer

local Gui = script.Parent

local WhiteListedPlayers = {"plrname","plrname"} -- Player Names

for i = 1,#WhiteListedPlayers do
    if Player.Name == WhiteListedPlayers[i] then
        Gui.ResetOnSpawn = false
        Gui.Parent = Player:WaitForChild("PlayerGui")
    else
        Gui:Destroy()
    end
end

this need to be inside an local script thats inside the gui

put the gui inside StarterPlayer > StarterPlayerScripts

i hope this works

Ad