Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

ChatBubbleGUI: Why wont it work?

Asked by
sigve10 94
9 years ago

So I have tried to make a chat Bubble Script that will pop a gui above the player's head with his/hers message, but when i tested it, the results weren't quite what I was going for: It did the test command (above "----"), but it didn't do anything when I tried chatting (below "----"). Anyone who can help? Here is the full script (please don't copy it):

01color = script.Parent.Color.Value
02local chatted = script.BillboardGui:Clone()
03chatted.Parent = script.Parent.Parent.Parent.Parent.Character.Head
04chatted.Enabled = true
05chatted.TextLabel.TextColor3 = color
06chatted.TextLabel.Text = "Hello World"
07wait(5)
08chatted:Destroy()
09 
10----
11 
12game.Players.PlayerAdded:connect(function(player)  
13    player.Chatted:connect(function(msg)
14        local chatted = script.BillboardGui:Clone()
15        chatted.Parent = player.Character.Head
View all 22 lines...

The used objects Tree/Hierarchy:

Color Script BillboardGui TextLabel

Answer this question