Script works fine on roblox microsoft but doesnt work on the regular version?

edit: it also works on mobile devices.

yeah so my game has a lobby system and theres a refresh room function that basically just shows you all the players inside of the room you joined and it used to work fine, but now for some reason it only works on the microsoft store version of roblox.
heres a video:


and here is the function:

module.refreshRoom = function()
	local plrGui = plr.PlayerGui
	for i,v in pairs(plrGui.Menu.Rooms.Storage.Room.Players:GetChildren()) do
		if v:IsA("Frame") then
			v:Destroy()
		end
	end
	print("Success")
	local rooms = game.ReplicatedStorage.Remotes.GetPublicRooms:InvokeServer()
	for i,v in pairs(rooms) do
		spawn(function()
			print("Success2")
			if v.owner == plrGui.Menu.Rooms.Storage.Room.Owner.Value then
				local isOwner = false
				if v.owner == plr.Name then
					isOwner = true
					plrGui.Menu.Rooms.Storage.Room.Start.Visible = true
					plrGui.Menu.Rooms.Storage.Room.Password.Visible = true
				else
					plrGui.Menu.Rooms.Storage.Room.Start.Visible = false
					plrGui.Menu.Rooms.Storage.Room.Password.Visible = false
				end
				for i,p in pairs(v.playerNames) do
					spawn(function()
						print("Success3")
						local templateClone = plrGui.Menu.Rooms.Templates.PlayerTemplate:Clone()
						templateClone.Parent = plrGui.Menu.Rooms.Storage.Room.Players
						local plrPic = game.Players:GetUserThumbnailAsync(game.Players[p].UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
						templateClone.PlayerPic.Image = plrPic
						templateClone.PlayerName.Text = p
						if p ~= plr.Name and isOwner then
							templateClone.Kick.Visible = true
						end
						templateClone.Visible = true
					end)
				end
			end
		end)
	end
end

also im not getting any errors. heres the output:

Microsoft:
image

Regular:
image

any help appreciated, i am really confused and i have no idea what could be going on here.

You only showed us the client or server output. That doesnt mean that the server or client didnt error.

1 Like

nope there is nothing on the server side. heres the script:

local remote = game.ReplicatedStorage.Remotes.GetPublicRooms

remote.OnServerInvoke = function(plr)
	print("1")
	local rooms = {}
	for i,v in pairs(game.ServerStorage.Rooms:GetChildren()) do
		local room = {}
		local password = false
		if v.Password.Value ~= "" then
			password = true
		end
		room.reqpass = password
		room.ingame = v.InGame.Value
		room.owner = v.Owner.Value
		room.players = #v.Players:GetChildren()
		room.maxplayers = v.MaxPlayers.Value
		local names = {}
		for i,p in pairs(v.Players:GetChildren()) do
			table.insert(names,p.Name)
		end
		room.playerNames = names
		table.insert(rooms,room)
	end
	
	print("2")
	return rooms
end

and output:

it always prints both 1 and 2 so technically it should return

finally fixed the issue by firing the refresh room function from the server with a remote event instead of firing it from the module in the local script.