How would I go about letting other developers know that my Model is outdated if they're using my model?

Reworded Question:

How to let other Developers know if my Model is outdated from the version they have installed in their game?


I tried looking up MarketplaceService, but I don’t think anything within the GetProductInfo() table is going to assist me with what I want to accomplish.


What do I want to achieve exactly?

I want to be able to let other Developers who have used my model, that it is currently outdated if I were to update the model with a newer version. I’m not talking about ModuleScripts or anything, I’m talking about Models (Normal Scripts in specific)

I don’t quite know if Roblox even has an API for this, but if they do, what method do I need to do to print in the Developer console if the Script is outdated?


Why this matters to me

I need to know this because if there is a bug with my Script, and I updated it, I want the developer to get a print within their console when they play test, or are in the actual game, that the model needs to be reinstalled and that it’s outdated.

Anyways I’m sure you guys get the point now. Any help with this would be nice! (preferably don’t want to run a web server to accomplish this)

FYI

I’m not asking for any scripts here, I just need to know what I would need to accomplish this. I’m a bit lost.

Unless you have a require(module_id) in your code, no. If you did use a module required by ID then you can simply change the module.

So, what you’re saying here is that it’s practically impossible if you don’t use ModuleScripts? I don’t think my code is really suit for a ModuleScript. It’s a drag and drop solution, which can be found here, you probably saw it from a bump earlier:

It’s impossible because updating a free model does not update the existing ones in a game.
Updating a MainModule will cause all the existing scripts that call require() on it’s ID to use the new and updated module.

Which is exactly why I made this post.

How would I tell the Developer that the script was updated if I were to convert my resource to use ModuleScripts? Is there a specific process for detecting if a ModuleScript was updated, or is that only possible if I make an entirely new module and update that one, and make the old ModuleScript print that a new module was made in place of the old? (similar how to Adonis Loader works)

I don’t think so.
One way to do this is that you place all of your code in a ModuleScript and then have a Script inside your Model that requires the ModuleScript. Requiring a ModuleScript runs it.
An example model is this:
image

-- MainModule, pretend this has an ID of 1234
return function()
    local function MouseClick(player: Player)
        print("Hello!")
    end
    
    script.Parent.ReallyCoolPart.ClickDetector.MouseClick:connect(MouseClick)
end
-- Model.Script
local module_function = require(1234)
module_function()

This is a model that will print “Hello!” whenever someone clicks the part.
However, that part is a little boring. If we change something about the model (for example, by adding a few parts) then we will need to update the old MainModule accordingly.
Remember that we can’t change Model.Script, only MainModule. This is why there is barely any code in Model.Script.

“Hello!” is also not really that personal. How about instead of saying “Hello!”, we say “Hello, (username)!” We’ll also need to change our MainModule for that.

Here’s my new model:
image

We’ve added a cool new mesh to make the model more interesting.
To warn the user that a new release has been made, we can do the following:

-- Our old MainModule with the ID of 1234
warn("This model is outdated! Please re-insert this model.")
(the rest of the module here, completely unchanged)
-- Our shiny new MainModule with the ID of 1245
return function()
    local function MouseClick(player: Player)
        print("Hello", player.Name)
    end
    
    script.Parent.ReallyCoolPart.ClickDetector.MouseClick:connect(MouseClick)
end
-- Model.Script
local module_function = require(1245)
module_function()

However, there’s a problem. This prints “Hello (username)” which is not nearly as professional as we would’ve hoped.

If your model stays the same with only code changes you can just update the ModuleScript. No warnings necessary.

And so:

-- The same MainModule with the ID of 1245
return function()
    local function MouseClick(player: Player)
        print("Hello,", player.Name .. "!")
    end
    
    script.Parent.ReallyCoolPart.ClickDetector.MouseClick:connect(MouseClick)
end

This was done without having to warn the user about any model changes.

I see. It’s just tedious to let the Developer know the module was updated, because to do that I need to make a new module every single update, so I’ll just make it a function that automatically updates silently. I appreciate the help.

For anyone reading, there isn’t an easy way to do this, but if you really want to let the developer know you updated a model, follow this post: How would I go about letting other developers know that my Model is outdated if they're using my model? - #6 by parslmonious

Couldn’t you theoretically use packages?
I’m not sure if they work in games you don’t own and I haven’t used them all that often but it’s similar to what you’re talking about

1 Like

This was something I was considering due to the fact that Roblox has “Ownership” as a property on the Packages version of a model, but since it’s a model and not just the script itself, this use-case is useless.

I did update my Motor6DHandler script to a ModuleScript. If you’d like to view the source code, you can do so here if you’re curious to see how I wrote it.

In-case you don’t have BTRoblox installed

Also yeah I just noticed that my Part0 and Part1 variables are completely useless in the Attach function, but that can be removed at a later date.