Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Message = game.ReplicatedStorage:WaitForChild("Message")
- local Image = Message:WaitForChild("SpeakerImage")
- local Speaker = Message:WaitForChild("SpeakerName")
- local player = game.Players.LocalPlayer
- local DialogueFrame = player.PlayerGui:WaitForChild("DialogueSystem").DialogueFrame
- local function DialogueMessage()
- if Message.Value == "None" then
- DialogueFrame.Visible = false
- else
- DialogueFrame.Visible = true
- end
- DialogueFrame.Message.Text = Message.Value
- script.Click:Play()
- end
- local function DialogueSpeaker()
- DialogueFrame.Icon.Image = Image.Value
- DialogueFrame.nameLabel.Text = Speaker.Value
- end
- Message:GetPropertyChangedSignal("Value"):Connect(function()
- DialogueMessage()
- end)
- Speaker:GetPropertyChangedSignal("Value"):Connect(function()
- DialogueSpeaker()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement