So in games like Arsenal, the player’s avatar is displayed in a UI and I was wondering how that would be possible. Any ideas?
Use viewport frames, they have the ability to display 3D objects. If you’d like the character to be animated, insert a WorldModel object into the viewport frame and insert the character into the WorldModel.
You can’t create the worldmodel with the insert menu though, you have to use Instance.new("WorldModel")
Note:
I’m not really sure what Arsenal uses so this is just an assumption, but this is one way to achieve what you’d like to be accomplished.
This should be placed in a local script:
local Players = game:GetService(“Players”)
local player = Players.LocalPlayer
– Fetch the thumbnail
local userId = player.UserId
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local content, isReady = Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
– Set the ImageLabel’s content to the user thumbnail
local imageLabel = script.Parent
imageLabel.Image = content
imageLabel.Size = UDim2.new(0, 420, 0, 420)
You can adjust the ImageLabel’s content accordingly.
Hope this helps and good luck!
WorldRoot and WorldModel are two different objects. WorldRoot is a new abstract superclass for the Workspace containing raycast methods and all from which the Workspace now inherits from. WorldModel also inherits from WorldRoot.
WorldModel is missing from Insert Objects though, yeah, has to be made with Instance.new.
My bad, I just got mixed up with the names.