Okay so im trying to make an intro for ym game that types for you, it work and everything but it replays whenever the player dies which is not something i’d want and it can get annoying.
i’ve tried destroying it after it runs but it runs right back which yeah
i’ve tried making it only run when the player joins but that for some reason also doesn’t wanna work
local function typewrite(textlabel, text, sound)
sound:Play()
for i = 1, #text do
textlabel.Text = string.sub(text, 1, i)
task.wait(0.05)
end
sound:Stop()
end
task.wait(1.5)
local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://9058815929"
sound.Parent = script.Parent
local player = game.Players.LocalPlayer
local function onCharacterAdded(character)
typewrite(script.Parent.Frame.TextLabel, "Turn the volume all the way up for the best experience", sound)
task.wait(3)
script.Parent.Enabled = false
task.wait(2)
script.Parent:Destroy()
end