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

Place updated detection?

I saw it in The Quarry, where if the place is updated, it teleports everyone to a different place.

I'm not sure if this is a universe or something, or if it literally can detect if the place is updated.

If anyone knows how this works, can I get a wiki link?

1 answer

I've done something like this before. Take a look at my script.

local placeid = game.PlaceId
local start = game.MarketplaceService:GetProductInfo(placeid)
local startup = start['Updated']
local isShuttingDown = false

function shutdown()
	isShuttingDown = true
	for i,v in next, game.Players:GetPlayers() do
		v:Kick()
	end	
end

while wait(1) do
	if not isShuttingDown then
		local newinfo = game.MarketplaceService:GetProductInfo(placeid)
		local newup = newinfo['Updated']
		
		if newup ~= startup then
			local m = Instance.new("Message", Workspace)
			m.Text = "This game has been updated! Shutting down server..."
			wait(1.5)
			shutdown()
		end
	end	
end

game.Players.PlayerAdded:connect(function(p)
	if isShuttingDown then
		p:Kick()
	end
end)

Just be careful with this one. It depends on the updated time, and that time updates when you update the description.

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