This LocalScript in StarterPlayerScripts is not working. It should open a UI frame. Why is it not working?
local plr = game.Players.LocalPlayer
plr.Chatted:Connect(function(msg)
if msg:lower() == ">>/openpanel"
plr.PlayerGui.Panel1.LoginFrame.Visible = true
end
end)
Also, the error says that “Panel1” is not a valid member of the Player’s PlayerGui. Meaning it either doesn’t exist or didn’t load yet.
local plr = game.Players.LocalPlayer
plr.Chatted:Connect(function(msg)
print((msg:lower() == ">>/openpanel"), msg:lower())
if msg:lower() == ">>/openpanel" then
plr.PlayerGui:WaitForChild("Panel1").LoginFrame.Visible = true
end
end)