I am more of a builder than a scripter within ROBLOX and I was wondering how I could make a GUI pop up for everybody when a chat command is ran? I’d like to add a time limit to each GUI aswell meaning like, every 20 seconds a different GUI pops up for everyone until it has finished presenting all of the GUIs. It sounds confusing but I quite need this feature for my game. Thanks.
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
-- the msg param is a string of what the player said
-- do ui code
end)
end)
local plr = game.Players.LocalPlayer -- player
plr.Chatted:Connect(function(msg) -- on a message sent by the player, run this function:
if msg:lower() == "!gui" then-- check if the message in lower case is !gui
plr.PlayerGui.gui.Frame.Visible = true -- set frame to visible
end
end)
Wrote on mobile, formatting might not be the best.
Sorry if I’m confusing you, I’m not really a scripter so where would I put this script? And is there a way to time the GUI so it closes within around 20 seconds? Sorry if I’m asking for too much,
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
if plr:GetRoleInGroup(123456689) and string.lower(msg) == "jump all" then
plr.PlayerGui.MyGui.MyFrame.Visible = true
end
end)