I have this function in a server script put in ServerScriptService, the chat thingy works and other stuff except the enabling / disabling the GUI. Can someone help me? The script is attached below.
barprompt.Triggered:Connect(function(plr)
barprompt.Enabled = false
chat:Chat(baristamodel.Head, "hello", Enum.ChatColor.White)
wait(1)
chat:Chat(baristamodel.Head, "what would you like to order?", Enum.ChatColor.White)
ordergui.Enabled = true
ordergui.Frame.List.BloxyCola.MouseButton1Click:Connect(function()
ordergui.Enabled = false
chat:Chat(baristamodel.Head, "there you go", Enum.ChatColor.White)
bloxycola.Parent = plr.Backpack
wait(2.5)
barprompt.Enabled = true
end)
end)```