08:18:12.704 - Players.Player1.PlayerGui.main_Panel.admingui.warn.LocalScript:2: attempt to call method 'FindFirstChild' (a nil value) 08:18:12.704 - Stack Begin
Here is the code:
local player = game.Players:GetPlayers()
local gui = player:FindFirstChild("PlayerGui"):FindFirstChild("main_Panel")
local warnbutton = gui:FindFirstChild("admingui"):FindFirstChild("warn")
local typemessage = gui:FindFirstChild("admingui"):FindFirstChild("typemessage")
local warnmessage = gui:FindFirstChild("admingui"):FindFirstChild("warnmessage")
warnbutton.MouseButton1Click:connect(function()
print("bruh")
end)

1 comment
Your variable 'gui' is directly searching for PlayerGui in the list of Players . :)