I’m trying to figure out how I can make something spawn on top of a player after they say a specific phrase.
I’m having the most trouble trying to make it spawn on top of the player and how to see if the player said the specific phrase.
I’m trying to figure out how I can make something spawn on top of a player after they say a specific phrase.
I’m having the most trouble trying to make it spawn on top of the player and how to see if the player said the specific phrase.
So to start off, I will give you the basic part. You’re going
to need access to the player that is about to chat so here’s what you put.
(In a Local Script please)
local plr = game.Players.LocalPlayer
plr.Chatted:Connect(function(msg)
if msg == "YourPhraseHere" then
--Your Code from here
end
end)
Or you could also do:
local plr = game.Players.LocalPlayer
plr.Chatted:Connect(function(msg)
if msg == "YourPhraseHere" then
--Your Code from here
else
--Your other code if it's not?
end
end)
The rest is all up to you to spawn the thing over the character.
I’d suggest maybe adding “lower()” to the message checking, that way it’s not case sensitive.