Making a client gui server sided

So I’m trying to make a height bar like in Tower of Hell but the problem is making the ImageLabel showing the local player visible to everyone else with their own player image on it. It seems pretty basic by using remote events but there comes a problem. Setting the ImageLabel’s image to a player requires a LocalScript. Here’s the code for the LocalScript

local ThumbnailType = Enum.ThumbnailType.HeadShot
local ThumbnailSize = Enum.ThumbnailSize.Size48x48
local Players = game:GetService("Players")
local Player = Players.LocalPlayer

while wait() do
    script.Parent.Image = Players:GetUserThumbnailAsync(Player.userId, ThumbnailType, ThumbnailSize)
end

Here’s the layout of the GUI:
Screenshot 2020-06-29 at 8.46.08 pm

Yes, it does work but only shows yourself.
Screenshot 2020-06-29 at 8.47.09 pm

I’ve spent countless hours trying to figure this out with various failed solutions such as RemoteEvents going back and forth for more than 4 times. This is a real challenge for me and now I need the support of the DevForum Community, thanks!

4 Likes

Instead of using Players:GetUserThumbnailAsync() just set the Image to the following link and change the UserId like so:

script.Parent.Image = "https://www.roblox.com/headshot-thumbnail/image?userId="..Player.UserId.."&width=48&height=48&format=png"
1 Like

Thanks for the help, I’ll try it out now.

1 Like