Hey everyone,
I watched about 2 videos on YouTube about Typewriting Text and Cutscenes, but, everything was going alright when I wrote TextLabel.Visible = true. I already tried turning Visible on the TextLabel on and off manually, and that didn't do anything.
Here is my code:
local debounce = false
local textlabel = game.StarterGui.TextGui.TextLabel
local Text
local sfx
function soundeffect()
sfx = game.Workspace.Sounds.DingVoiceSfx
sfx:Play()
coroutine.resume(coroutine.create(function()
end))
end
local maketextwait_time = 0.04
function maketext(word)
Text = word
for i = 1, #Text do
textlabel.Text = string.sub(Text,1,i)
soundeffect()
wait(maketextwait_time)
end
end
local pf = game.Workspace.PartsForCutscene
local TweenService = game:GetService("TweenService")
local Camera = game.Workspace.CurrentCamera
local function MoveCamera(StartPart, EndPart, Duration, EasingStyle, EasingDirection)
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = StartPart.CFrame
local Cutscene = TweenService:Create(Camera, TweenInfo.new(Duration, EasingStyle, EasingDirection), {CFrame = EndPart.CFrame})
Cutscene:Play()
wait(Duration)
end
game.Workspace.Map.Secret.MainDoor.Touched:Connect(function(hit)
if not debounce then
debounce = true
if hit.Parent.Name == "HairAccessory" then
hit.Parent.Parent.HumanoidRootPart.Anchored = true
end
wait(2)
local function Cutscene()
MoveCamera(game.Workspace.Map.Secret.TeleportPart,pf.Part1,2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out)
wait(2)
MoveCamera(pf.Part1,pf.Part2,2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out)
wait(.5)
Camera.CameraType = Enum.CameraType.Custom
Camera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
end
Cutscene()
game.StarterGui.TextGui.TextLabel.Visible = true
maketextwait_time = 2
maketext("...")
wait(10)
hit.Parent.HumanoidRootPart.Anchored = false
debounce = false
end
end)
Is there anything wrong with the code or is it a Roblox Studio bug?

1 comment
You're changing it through the StarterGui. You have to change it through the player's PlayerGui.