Command that teleports a player when they say it

So I have this command that used to teleport the player when they said it but now it has suddenly stopped working everywhere where I have been using it, any ideas why?

Code:

local players = game:GetService("Players")
local Group = 6614461
local Rank = 14

players.PlayerAdded:Connect(function(plr)
    plr.Chatted:Connect(function(msg)
        if msg == "!backstage" and plr:GetRankInGroup(Group) >= Rank then
			plr.Character:SetPrimaryPartCFrame(CFrame.new(Vector3.new(10,10,10)))
        end
    end)
end)
2 Likes

Are there any errors? Have you changed the groups ranks?

Everything has stayed the same but one day it was working and now it is not. And no script errors.

Are you still a member of the group?

Yes, I own the group that it is linked to.

Try doing:

print(msg)

before the if statement, and see what is returned.

There is currently a bug taking place which has affected many chat systems/admin commands. Please refer here for more information: Hitting enter in a textbox places a carriage return before finalizing input (broken again) - #35 by IdoAkumu

1 Like

Ah I see, that would probably be why.

Is there any idea when this issue will be fixed?

It is an issue on Roblox’s side. It is quite simple to fix this issue tho, it won’t affect your code even after the bug has been patched.

All you need to do is add this line of code at the top of the msg == “!backstage” check:
msg = string.gsub(msg, "%c", "")

3 Likes