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

How can i create a script so only certain people can open a gui?

Asked by 5 years ago

is there a way to make a script so that only certain people can open a gui?

1
there is a way. And before you ask for some script you asked a yes or no question and all you'll get is a yes or no answer. User#24403 69 — 5y
0
Yes, there is a way. Yosufgamer -7 — 5y
0
Please include a script in your question, scripting helpers is not a request site so therefore you will most likely not receive a direct answer. CaptainAlien132 225 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Simple script when a player touches a part a gui appears. You could create a table of names and have it check the table to allow it to open.

local function onTouch(part)
    if part.Name == "Head" and part.Parent.Name == localPlayer.Name then        
        gui.Visible = true
    end
end

local function onTouchEnded(part)

    if  part.Name == "Head" and part.Parent.Name == localPlayer.Name then   
    gui.Visible = false
    end
end



store.Touched:connect(onTouch)
store.TouchEnded:connect(onTouchEnded)
0
Bowser. Please indent. User#24403 69 — 5y
Ad

Answer this question