Open UI Chat Command not working

Hi!
This probably my weirdest issue.

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)

Thanks!

Did you put then in the actual script or is this just a typo?

image
typo in the post

1 Like

it should be

if > msg:lower() == “>>/openpanel” then

Can’t see anything wrong with the code. Add this:

print((msg:lower() == ">>/openpanel"), msg:lower())

Where in the code?

? aaaaaaaaaaaaaaaaa

Under the event connection

plr.Chatted:Connect(function(msg)
 -- print here

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)


Do I need a WaitForChild?

Yea, but let me see what you’re code looks like now, you’re getting syntax errors but I don’t know why.

Also, let me know what it prints

thanks! im stupid forforgetting the waitforchild/


for some reason the debugger in my client is TOTALLY BROKEN

You might want to file a bug report