Help With A GUI Chat System

So I am trying to make a character speech system for my theme park, and I have a gui giver inside the morph button and the gui has buttons to click for a certain line of speech. The speech is supposed to appear as a billboardgui above the players head, but I cannot get it to work. Can anyone help me out?

1 Like

Can you show us the script? If not, we cannot help you out.

1 Like

Here is the script. Just a side note I am not good at scripting so its probably a simple fix.

local player = game.Players.LocalPlayer
local button = script.Parent
local PlayerName = game.Players.LocalPlayer.Name

function onClicked()
print(player.Name)

game.Workspace.PlayerName.Hair.Speech.Talk.Enabled = true

end

button.MouseButton1Click:connect(onClicked)

1 Like

Please format your code correctly.

Why are you doing game.Players.LocalPlayer when you already have a reference of this?

And it seems like you need to do remote events to be able to do this.

1 Like

I dont understand much about what I have done, I have just searched on google and tried whatever has come up.

1 Like

You should probably learn more basics of scripting first before you can start these stuffs that involves remote events.

1 Like

Ok thank you. I will read into it

1 Like