Recently, I have been helping my friend create a tower of hell type of game, just the phases do not modify. I made the little sidebar that shows how high the player is on the tower. The only problem is, I was only able to make it work with the local player. This is a local script that is supposed to put other players on the bar even though it doesn't work:

local plrs = game.Players:GetPlayers()

game:GetService("RunService").Heartbeat:Connect(function()
	for i, v in pairs(plrs) do
		local name = v.Name
		if name ~= game.Players.LocalPlayer then
			if not script.Parent.Parent:FindFirstChild(name) then
				local newGui = script.Parent.Parent.Labels.Template:Clone()
				newGui.Name = name
				newGui.Parent = script.Parent.Parent
				newGui.Visible = true
				newGui.PlayerName.Value = name
				newGui.GetAppearance.Disabled = false
				newGui.Height.Disabled = false
			end
		end
	end
end)

Thank you in advance!

3 comments

1

Just personally I would have one ui for all the players and calculate it all on each individual client. No need to mess with the server then.

0

Ok. Thx! Do you mind making an answer so I can give you credit (reputation) for help?

0

@CreationNation1 just an upvote on the comment is enough for me, thank you though.