The goal of this script is that when ever someone touch's the invisible block near the npc the npc will say G'day and then the players name who touched the block
button = game.Workspace.Talk function onTouch(other) local human = other.Parent:FindFirstChild("Humanoid") if not human then return end local player = game.Players:GetPlayerFromCharacter(other.Parent) if not player then return end local color = "Blue" --This can also be "Green" or "Red" game:GetService("Chat"):Chat(script.Parent, "G'Day"..player.Name, color) wait(interval) end button.Touched:connect(onTouch)
I get what you wanted to do but I'm not sure what was wrong with the script. It might have been because you had a ' in the G'day. Because a ' and a " are used for string values and can glitch the script. So you should just put Good day instead of G'day.
Use Dialog in Studio...