Post System Inside Roblox?

Hello! I had this great idea in my head to make a game like the Roblox Dev Forum but in a Roblox game. The only thing is I couldn’t brainstorm any ideas on how to create a post system. Can anyone help me with this idea?

Well, it depends how you want to handle it.
Each Server is a different forum or the whole game is one whole forum.

The whole game will be one whole forum.

You would have to use Messaging Service, along with Filtering the strings.

May you give an example or tutorial?

Biggest thing I think preventing this from being a thing is that text filtering currently can’t be used with offline users. You’re not allowed to store and display pre-filtered strings since the filters change over time.

Otherwise, it’d probably be a combination of an OrderedDataStore with each key being some topic identifier and value being the last updated time, then a GlobalDataStore with topic info, then another OrderedDataStore for each post in one thread, then another GlobalDataStore with info about each post.

*This is a system I came up with off the top of my head and is most likely inefficient.

Here’s an example of using Messaging Service

local MessagingService = game:GetService("MessagingService")
local Values = {
  Num = 5,
  String = "Boom",
  Bool = true
}

local PublishSuccess, PublishResult = pcall(function()
    MessagingService:PublishAsync("StockMartket", Values)
end)

game.Players.PlayerAdded:Connect(function(Player)
    local Connection = MessagingService:SubscribeAsync("StockMarket", function(Value)
        print(Value.Num, Value.String, Value.Boom)
    end)

    Player.AncestryChanged:connect(function()
        -- Unsub from topic.
        Connection:Disconnect()
    end)
end)

You’d call

PublishAsync(string, Variant)

When they post something…
Subscribe Async would be used to Update the users screen with the new topic.

Of course like @ihaveamac said

You’d want to actually store it all in DataStores, and you’d have to filter the string every time it’ll get displayed to a user.

1 Like