#Have two image labels

2 messages · Page 1 of 1 (latest)

quartz current
#

Unless you are having the character models themselves update everytime the player it's based off of changes avatars, I don't recommend using the player's thumbnails.
Another con of it is that it only works for players, and not custom characters or rigs you wish to use.

So I would opt to using ViewportFrames instead of imagelabels for this use-case.
Everytime a message is prompted, have the ViewportFrame visually focus to a character model of the person speaking
https://create.roblox.com/docs/reference/engine/classes/ViewportFrame
If you need help learning how to properly use ViewportFrames, feel free to ask.

Class.GuiObject|GUI that can display children 3D objects.

quartz current
#

Step 1: Manual change
Replace the imagelabel with the new ViewportFrame manually, design it however you want.

Step 2: Script NPC cloning
Everytime you wish to clone an NPC, make sure to get rid of the old ones first so they don't accidentally pop up in other NPC's dialogues, find them via getchildren().
Since you already have a way to get the NPC that you talk to, create a new variable that will clone them.
Then set that clone's parent to the ViewportFrame (since it's sort of like another game screen, the NPC clone first needs to exist inside of it)

Step 3: Script ViewportFrame Camera Position
Use an if statement to check if the ViewportFrame.CurrentCamera is not nil.
If it is nil, then insert a Camera via scripting into the ViewportFrame, and set the ViewportFrame.CurrentCamera to it.
Change the CFrame of the ViewportFrame.CurrentCamera to be positioned and angled relative to that NPC clone.

Step 4: Completion
After that, you should be done!
If you need assistance on any of these steps, be sure to let me know.