Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Player list on key pressed?

So, i made the Playerlist GUI invisible

game:GetService("StarterGui"):SetCoreGuiEnabled("PlayerList", false)

How would i make it so when a player hits a certain key it opens to that player?

1 answer

✓ Accepted answer

--Local Script

function KeyDownFunctions(key)
	if key == "Q" then
		game:GetService("StarterGui"):SetCoreGuiEnabled("PlayerList", true)
	end
	if key == "E" then
		game:GetService("StarterGui"):SetCoreGuiEnabled("PlayerList", false)
	end
end

Or try this

open = false

function KeyDownFunctions(key) 
	if key == "Q" then
		game:GetService("StarterGui"):SetCoreGuiEnabled("PlayerList", true)
	open = true
end
	if key == "E" then
		game:GetService("StarterGui"):SetCoreGuiEnabled("PlayerList", false)
		open = false
end
end

2 comments

0

And will this only make it Visible to the player that presses the key?

0

Let me edit it.

This discussion is preserved as it was. New answers, comments, and votes are closed.