Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local DialogueEvent = game.ReplicatedStorage.RemoteEvents.GuiEvents.DialogueEvent
- local Frame = player.PlayerGui:WaitForChild("DialogueGui").Frame
- local function AnimateText(Dialogue)
- for i = 1, #Dialogue, 1 do
- Frame:WaitForChild("DialogueLabel").Text = string.sub(Dialogue, 1, i)
- wait(0.04)
- end
- end
- DialogueEvent.OnClientEvent:Connect(function(PlayerImage, PlayerName, Dialogue)
- Frame.Visible = true
- Frame:WaitForChild("NameLabel").Text = PlayerName
- Frame:WaitForChild("ImageLabel").Image = PlayerImage
- AnimateText(Dialogue)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement