For example, I'm trying to get an NPC to say something like, "Greetings, (player's name)!"
Is there a variable I can call to do that in the script? Better yet is there any way I can do it straight from the properties box? Thanks.
Yes, there's a service you can use for this. Unless you're doing custom, here would be ROBLOX's chat bubbles:
NPC = npchere ChatService = game:GetService("Chat") --just did this to make it easier. ChatServce:Chat("Your text here",npc.PartYouWantBubbleToShowOn,Enum.ChatColor.Red) --pick from the colors red, green, or blue.
Want a player's name to appear? Well do the same thing but with a little fix!
NPC = npchere ChatService = game:GetService("Chat") --just did this to make it easier. ChatServce:Chat("Your text here"..player.Name,npc.PartYouWantBubbleToShowOn,Enum.ChatColor.Red) --pick from the colors red, green, or blue.
That should work! Good luck!
Marked as Duplicate by hiimgoodpack, lukeb50, Void_Frost, and PyccknnXakep
This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.
Why was this question closed?