Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you slice a player image?

Asked by
xEiffel 280 Moderation Voter
5 years ago

Hi, so I have been wondering how to do this with the player icon...

https://gyazo.com/1a10b9e99f6f389cba08f0e22c4aa864

Basically, they have somehow sliced the other part of their body and only made their upper torso and above visible, how do I do this?

I've done the main part of it;

Player = game.Players.LocalPlayer
script.Parent.PlayerIcon.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=200&y=200&Format=Png&username=" ..Player.Name

I'm wondering if anyone knows, If you do please tell me! I tried using slice but that is pretty confusing.

1 answer

Log in to vote
2
Answered by 5 years ago
Edited 5 years ago

Use this code:

local Player = game.Players.LocalPlayer

script.Parent.PlayerIcon.Image = game:GetService("Players"):GetUserThumbnailAsync(
Player.UserId,Enum.ThumbnailType.AvatarBust,Enum.ThumbnailSize.Size352x352
)

Read this for more info on usage..https://developer.roblox.com/api-reference/function/Players/GetUserThumbnailAsync

Change the ThumbnailSize to ThumbnailSize.Size180x180 or however you want it, whichever one looks the most like you wanted. Also note that images may sometimes appear N/A which is annoying. https://devforum.roblox.com/t/n-a-images-with-getuserthumbnailasync/106013/7

0
Thanks xEiffel 280 — 5y
2
np DaCrazyDev 444 — 5y
Ad

Answer this question