Problem with inserting images by using script

Hello devs!

I want to change Image by using script but instead of inserting the correct image ID, he inserts nil.

Here is code (local script):

function animateText(text, characterName, characterImage)
	DialogueFrame.Visible = true
	local displayText = text
	CharName.Text = characterName
	CharImage.Image = "rbxassetid://"..tostring(characterImage)

	if translator then
		displayText = translator:Translate(Dialogue, text)
	end
	
	for i = 1, #displayText do
		Dialogue.Text = string.sub(displayText, 1, i)
		task.wait(0.01)
	end
end

----------------------------------------

workspace.LeverSystem.Fairoutismissing.Level1.lever.ClickDetector.MouseClick:Connect(function()
	camera.CameraType = Enum.CameraType.Scriptable
	
	local char = game.Workspace.Map.Maps.Fairoutismissing.Poz1:WaitForChild("Fairout")
	local hum = char:WaitForChild("Humanoid")
	local animator = hum:WaitForChild("Animator")

	local animation = -- animation path
	
	local LoadedAnimation = animator:LoadAnimation(animation)
	
	camera.CFrame = char.Parent.CameraPart1.CFrame
	
	LoadedAnimation:Play()
	
	LoadedAnimation:GetMarkerReachedSignal("FairoutDialogue1"):Connect(function()
		animateText(DialogueModule.Dialogue1[1].Text, DialogueModule.Dialogue1[1].Name, DialogueModule.Dialogue1[1].Image)
	end)
end)

DialogueModule is a Module Script

Every help is good because I don’t know how to fix it.

I think it is a bug, since I as well couldn’t change the image Id using a script.

Try printing ‘characterImage’ and see what it does

As I said it’s set “nil” and I don’t know why.
image

Maybe DialogueModule.Dialogue1[1].Image doesn’t exist, oe you made a typo there?