I ran into a problem and do not know how to progress.
So basically, if you say a specific word in chat, a monster appears behind you and takes you.
I’ve already gotten the “takes you” part down, I just need to find a way to incorporate the chat and “monster appears behind you” part.
Except, I do not know how to do any of this. I am stuck. I’ve looked at similar forums, but none of them would be of use to me. Here is a video so you can see what the “takes you” part looks like.
local players = game:GetService("Players")
local npc = workspace.Dummy --Example dummy model.
players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
local character = player.Character or player.CharacterAdded:Wait()
if message:lower():match("^:tp%snpc$") then
npc:PivotTo(character:GetPivot())
end
end)
end)
The command is :tp npc, it can be changed if necessary.