Help with getRandomPlayer

Hello develupers I am very close to finish my story game but I want to make the same random player repeat the dialouge I will show you a exenple
Look theres two dialouges each one get a random player to talk but I want to make the same random player talk the two dialouges without altering the player ID, image and name.

The function to get the random player

Create dialouge event script

Sorry for images I can’t put scripts on can get a zoon😐 Thanks for your support.

If you want the player to remain the same, you have to keep the randomPlayerName variable constant, therefore only update it once:

getRandomPlayer() --updating it once
local image = getPlayerImage(randomPlayerId)
CreateDialogueEvent:FireAllClients(randomPlayerName, image, "text")
CreateDialogueEvent:FireAllClients(randomPlayerName, image, "other text")
1 Like

Thank for your help it’s very hard to see the scripts they are so small sorry for it.