Advertisement
Sungmingamerpro13

New DialogueGuiScript(STORY GAME)

Feb 27th, 2023
827
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.71 KB | None | 0 0
  1. local Message = game.ReplicatedStorage:FindFirstChild("Message")
  2. local Image = Message:WaitForChild("SpeakerImage")
  3. local Speaker = Message:WaitForChild("SpeakerName")
  4.  
  5. local player = game.Players.LocalPlayer
  6. local DialogueFrame = player.PlayerGui:WaitForChild("DialogueGui").DialogueFrame
  7.  
  8. Message:GetPropertyChangedSignal("Value"):Connect(function()
  9.     if Message.Value == "None" then
  10.         DialogueFrame.Visible = false
  11.     else
  12.         DialogueFrame.Visible = true
  13.     end
  14.     DialogueFrame.Message.Text = Message.Value
  15.     script.Click:Play()
  16. end)
  17.  
  18. Speaker:GetPropertyChangedSignal("Value"):Connect(function()
  19.     DialogueFrame.ImageFrame.ImageLabel.Image = Image.Value
  20.     DialogueFrame.NameFrame.nameLabel.Text = Speaker.Value
  21. end)
  22.  
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement