I've got a problem with my talk-button

Howdy. My goal is make a Talk Button whenever I click it but nothing seems to be working properly. I’m new at scripting. This is the script:

local LastNext = tick()
script.Parent.ClickDetector.MouseClick:connect(function(Player)
	if (not Player.Team or Player.Team.Name == 'Admissions' or Player.Name == "iCarlos98") and tick()-LastNext > 3 then
		workspace:WaitForChild('BoothSFX').Present:Play()
		game:GetService("Chat"):Chat(Player.Character,'PAPERS, PLEASE')
		LastNext = tick()
	end
end)

Hello, could you include any errors you’re getting?

1 Like

More specifically can you include a gif (or more generally a recording) of the output bar while you run the game and try to use the function?

The chat function requires 2 parameters, one is the object the message will be coming from, and the other is the text that will be displayed.

Player.Character is the players character model, not a part, so the message won’t show up.

Change Player.Character to Player.Character.Head

2 Likes