I'm trying to make a custom playerlist and I made an Input Began / Input Ended Function which is when you press tab the playerlist is visible.
[This is tricky because there are no errors.]
Code:
local PlayerList = game.StarterGui:WaitForChild("PlayerList")
local ScrollingFrame = PlayerList:WaitForChild("ScrollingFrame")
local Player = game.Players.LocalPlayer
local Template = game.StarterGui.PlayerList.Template
local Frame = game.StarterGui.PlayerList.Template:Clone()
-- UI Script
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Tab then
PlayerList.Enabled = true
ScrollingFrame.Visible = true
end
end)
UIS.InputEnded:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Tab then
PlayerList.Enabled = false
ScrollingFrame.Visible = false
end
end)
Please help me resolve this issue.

1 comment
seems like you're changing the gui in StarterGui instead of the players gui so its not going to do anything https://developer.roblox.com/en-us/api-reference/class/PlayerGui