Help with typewrite dialogue effect

I was trying to make a gasa4 like game and I wanted a dialogue system with a typewriter effect but it’s not working and I’m not getting any errors

I have a handler script in StarterGui
image

heres the script

local RP = game:GetService("ReplicatedStorage")
local Events = RP.Events

local function soundPlay()
	local sound = script.Sound:Clone()
	sound.Parent = script
	sound.Name = "ClonedSound"
	
	sound:Play()
	
	wait(1)
	
	sound:Remove()
end

Events.Talking.OnClientEvent:Connect(function(name,text,color)
	script.Parent.Visible = true
	
	script.Parent.npcName.Text = name
	script.Parent.npcName.TextColor3 = color
	
	for i=1, #text do
		script.Parent.npcText.Text = string.sub(text,1,i)
		coroutine.wrap(soundPlay)()
		
		wait(0.04)
	end
	
	wait(1)
	script.Parent.Visible = false
end)

I have a second script in the NPC with a proximity prompt
image

and heres the script

local RP = game:GetService("ReplicatedStorage")
local Events = RP.Events

local text = "you sussy baka"
local triggered = false

game.Players.PlayerAdded:Connect(function(player)
	script.Parent.TalkPrompt.Triggered:Connect(function()
		if triggered == false then
			Events.Talking:FireClient(player,"imposter",text,Color3.new(1, 1, 1)
			triggered = true
		else
			wait(5)
			triggered = false
		end
	end)
end)

and heres a remote event in replicated storage
image

idk why it doesn’t work I followed a tutorial for this and the UI doesn’t appear when the prompt is triggered

turns out a actully do have an error just couldnt find it

image

I FINALLY GOT IT WORKING YES
just had to fix a few errors

  1. This post belongs actually to #help-and-feedback:scripting-support
  2. Mark your reply as answer to close the post since it’s solved

sry lol i miss clicked on the wrong category

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.