#Developer Exclusive Features
1 messages · Page 1 of 1 (latest)
DevGUI.Visible = false
DevButton.Visible = false
if game.Players.LocalPlayer.Name == "Name1" or "Name2" then
DevButton.Visible = true
DevButton.Interactable = true
DevGUI.Interactable = true
else
DevButton.Visible = false
DevGUI.Visible = false
end
i even set the button and gui to invisible and uninteracteble in the instances themselves
you might have set the visibillity to the starter gui button and not the player button
wait but... even if then i set it invisible on default
could you show your whole script if you would not mind
i get that i have to put playergui instead of screengui but... ok lemme test smth
If it doesn't work show me your whole script
local Player = game:GetService("Players").LocalPlayer
local Gui = Player.PlayerGui.Gui
local DevButton = Gui.ButtonFrame:WaitForChild("4DevButton")
local DevGUI = Gui:WaitForChild("Dev")
DevGUI.Visible = false
DevButton.Visible = false
if Player.Name == "MOO_OOOI" or "Destroyer267654" then
DevButton.Visible = true
DevButton.Interactable = true
DevGUI.Interactable = true
else
DevButton.Visible = false
DevGUI.Visible = false
end
it doesnt work but here is the full thing
did you test if the script even runs
And where did you place it
under gui
does the script run use a print statement to check
add more print statements see if it prints if you join the game inside the if player.name == "yourname" part
if Player.Name == "MOO_OOOI" or "Destroyer267654" then
DevButton.Visible = true
DevButton.Interactable = true
DevGUI.Interactable = true
print("ee")
else
DevButton.Visible = false
DevGUI.Visible = false
end
This is what i used
yeah
i tried it with my alt called "MOO_OOOII" idk if it still counts as "MOO_OOOI"
@sterile frost
ima make it rq
thx
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local ScreenGui = script.Parent:WaitForChild("ScreenGui")
local TextButton = ScreenGui:WaitForChild("TextButton")
if Player.Name == "lon12431" then
TextButton.Visible = true
else
TextButton.Visible = false
end
this works fine
also
you need to do if player.name = "blah" or player.name = "bleh"
oh
???
use userid and not name
no
it didnt rly
it’s more secure
plus ue gonna need ifs on the server too
?
r u gonna use a remote event?
for what
@sterile frost it doesnt work at all
local DevButton = Gui.ButtonFrame:WaitForChild("4DevButton")
DevButton.Visible = false
if Player.UserId == "4060027411" or Player.UserId == "3692433033" then
DevButton.Visible = true
DevButton.Interactable = true
print("Obtained DevGui!")
else
DevButton.Visible = false
DevButton.Interactable = false
end
errors?
also the user id is better
ik i used it
is the gui enabled
so?
userid is not a string
it doesnt even print
why
cause why would u want a gui on ur screen without your input
huh
the screen ui runs scripts without any events
you dont need to
i mean u could 😭
dumb
then what
how
does the script run
like use print statemnt before and of the ifs
no it doesnt
where is it located
why u want visibility changing without an event
its in the screengui.gui
its simple i just need it to be visible if its me or my friend
try placing in directly in starter gui
why
btw do you know that starter gui gets cloned and put in PlayerGui
show the screengui and all its descendants
you could also do a player joined event on starterplayerscripts
thats much better
hmm
Players.PlayerAdded:Connect(function()
if Player.UserId == "4060027411" or Player.UserId == "3692433033" then
DevButton.Visible = true
DevButton.Interactable = true
print("Obtained DevGui!")
else
DevButton.Visible = false
DevButton.Interactable = false
end
end)
like this?
playeradded doesnt run on the client
like for the player
do it on the character added
Player.CharacterAdded:Connect(function()
if Player.UserId == "4060027411" or Player.UserId == "3692433033" then
DevButton.Visible = true
DevButton.Interactable = true
print("Obtained DevGui!")
else
DevButton.Visible = false
DevButton.Interactable = false
end
end)
what does the button do
yes
this worked for me
wrong script location then
boi just use a button
huh
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Gui = script.Parent:WaitForChild("Gui")
local DevButton = Gui.ButtonFrame:WaitForChild("4DevButton")
if Player.UserId == "4060027411" then
DevButton.Visible = true
else
DevButton.Visible = false
end
Just made this but now it doesnt show for anyone
dont put the user id in ""
why
its a number not a string
alr
if game.Players.LocalPlayer.Name == "Name1" or game.Players.LocalPlayer.Name == "Name2" then
DevButton.Visible = true
DevButton.Interactable = true
DevGUI.Interactable = true
else
DevButton.Visible = false
DevGUI.Visible = false
end
** You are now Level 5! **