I will make this simple, So i have a button gui and when i click it i want my character to say something using the roblox dialogue option, i have tried to figure it out but since im not quite sure what im doing. This is the script i have tried.
function onButtonClicked() game:GetService("Chat"):Chat(Player.Character.Head, "JustAExemple") end
script.Parent.MouseButton1Click:connect(onButtonClicked)
I am not quite sure as what im doing wrong but i think it has to do with the "Player.Character" i was just trying to see if someone could help me fix this, thank you for your time.