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

How would you "Cut" an image in an ImageLabel?

Asked by 7 years ago

This is what I have so far, it Just gets the players image and puts it on the image label, now what I wanted to do is zoom in on the players face area so it only shows that instead of the entire character how would I do that?

local Player = game:service('Players').LocalPlayer
local characterImageFormat='http://www.roblox.com/Thumbs/Avatar.ashx?x=352&y=352&format=png&userid=%d';



while wait(1) do
    script.Parent.Image = characterImageFormat:format(Player.userId);
end
0
You could always put the ImageLabel in a frame and set ClipsDescentants to true for that frame, then increase the size of the label. mattscy 3725 — 7y

2 answers

Log in to vote
2
Answered by
Rawblocky 217 Moderation Voter
7 years ago

Do this, this basically shows the version on the profile where you can only see the head.

local Player = game:service('Players').LocalPlayer
local characterImageFormat='https://www.roblox.com/headshot-thumbnail/image?userId=%d&width=420&height=420&format=png';



while wait(1) do
    script.Parent.Image = characterImageFormat:format(Player.userId);
end

If the image says "N/A", try loading the game again, and it will load in.

Ad
Log in to vote
1
Answered by 7 years ago

Try this, this is what I do. Adjust that x & y for how zoomed in you want. :)

local Player = game.Players.LocalPlayer
local Character = Player.Character
local Avatarurl = "http://www.roblox.com/Thumbs/Avatar.ashx?x=500&y=500&Format=Png&username="

local Avatar = script.Parent
Avatar.Image = Avatarurl..Player.Name
0
When I use your URL it just shows N/A as the image Fraxinus_Sanctus 38 — 7y
0
Did you use the entire script? Never2Humble 90 — 7y
0
Yes I did, it works fine without changing the values but once I do I get this error: Fraxinus_Sanctus 38 — 7y
0
- Image "https://assetgame.roblox.com/Thumbs/Avatar.ashx?x=500&y=520&Format=Png&username=Fraxinus_Sanctus" failed to load in "Players.Fraxinus_Sanctus.PlayerGui.HealthUI.ImageLabel.ImageLabel.Image": Request failed Fraxinus_Sanctus 38 — 7y

Answer this question