Hello DevFourm, I have an annoying problem with the Player.Chatted event. I am making a system where when a player types for example “/teleport” in the chat it moves their character to a position of a part. I made a script with:
if msg == "/teleport" then
plr.Character:MoveTo(game.Workspace.(the part).Position)
but that didn’t work. So I tried the print method and printing what the player said, but that didn’t work either. I don’t know how to explain it so I’ll give you the script:
(I try saying something in chat but the script returns nothing despite me printing the chatted event)
(This runs in a server script located inside the part I want the player to teleport to)
it’s generally a bad practice to put scripts under parts, the issue could be that your player added event connects late. scripts in serverscriptservice run before anyone joins the game, but i’m not sure if that is the case with scripts under parts.