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

How do I make a gui appear when I say, "/OpenGui"?

local RaidCommand = "/BeginRaid"
local function onPlayerChatted(player, message, recipient)
if message:sub(1, RaidCommand:len()):lower() == 	RaidCommand:lower() then
script.Parent.Visible = true
script.Parent.Parent.Background.Visible = true
script.Parent.Visible = false
wait(4)
script.Parent.Parent.Background.Visible = false
script.Parent.Visible = true
end
end
local function onPlayerAdded(player)
player.Chatted:Connect(function(...)
onPlayerChatted(player, ...)
end)
end
Players.PlayerAdded:Connect(onPlayerAdded)

1 answer

✓ Accepted answer

This should help:

game:GetService("Players").PlayerAdded:Connect(function(player)
    player.PlayerChatted:Connect(function(message)
	    if message == "[Put your message here]" then
		    -- Do stuff -- 
	    end
	end)
end)

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