Hi all! I’ve been working on a custom player board but I’ve had issues with getting it to display all the characters. To get the circle clipping mask I used boatbomber’s image clipping module.
As you can see, It repeats my character icon over and over again. What could be causing it?
-- FilteredScript 2020 --
local ImageMask = require(script.ImageMask)
local players = game.Players
local playertable = players:GetPlayers()
local images = script.Parent.Main:GetChildren()
local Types = {"Circle"}
for i=1, #Types do
for e, table in pairs(playertable) do
for a, image in pairs(images) do
local Image = "https://www.roblox.com/headshot-thumbnail/image?userId=".. table.UserId .."&width=420&height=420&format=png"
if image == image then
local f = ImageMask.new(Image, Types[i])
f.Parent = image
f.Size = UDim2.new(0.9,0,0.9,0)
f.SizeConstraint = Enum.SizeConstraint.RelativeYY
f.AnchorPoint = Vector2.new(0.5, 0.5)
f.Position = UDim2.new(0.5, 0, 0.5, 0)
end
end
end
end
Is the issue that your player is showing in every circle instead of all the players in the game?
Or is the issue that it should just be showing one circle with your character?
I’m not 100% sure if this will work as I don’t have your GUI, but give it a try. Assuming that script.Parent.Main contains all the frames to display player images, I changed your code so it looks at the player’s index (‘e’) e.g. player 1,2,3,4,5… and indexes script.Parent.Main with that - setting a single image per player.
local ImageMask = require(script.ImageMask)
local players = game.Players
local playertable = players:GetPlayers()
local images = script.Parent.Main:GetChildren()
local Types = {"Circle"}
for i=1, #Types do
for e, table in pairs(playertable) do
local Image = "https://www.roblox.com/headshot-thumbnail/image?userId=".. table.UserId .."&width=420&height=420&format=png"
image = images:GetChildren()[e]
local f = ImageMask.new(Image, Types[i])
f.Parent = image
f.Size = UDim2.new(0.9,0,0.9,0)
f.SizeConstraint = Enum.SizeConstraint.RelativeYY
f.AnchorPoint = Vector2.new(0.5, 0.5)
f.Position = UDim2.new(0.5, 0, 0.5, 0)
end
end
If that doesn’t work, send a pic of how your GUI is currently layed out.
I think the problem is that you are defining the images variable as images = Script.Parent.Main:GetChildren() which then you are doing images:GetChildren()[e]. I think you just need to remove one of the :GetChildren() from @Naco88 codes