I'm trying to make a dialogue box that appears then starts talking but for some reason its not changing the text of the text label
local mouse = game.Players.LocalPlayer:GetMouse()
local txt = game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.TextLabel.Text
mouse.Button1Down:Connect(function()
print("Mouse1Down")
if mouse.Target.Name == "Hitbox" then
print("Mouse1Down2")
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = true
txt = "Thank you so much for everything you have done dad!"
wait(13)
txt = "Happy Fathers Day! We really care about you!"
wait(10)
txt = "Thank you so much for raising us and being such a good parent!"
wait(10)
txt = " - Name"
wait(5)
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = false
else
print("False")
print("Target is " .. mouse.Target.Name)
end
end)

2 comments
Is it a localscript?
Yes