So i'm making a script where an admin can say "!place ID" and whatever number they put in ID, every player in the server goes to that place.

I know how to do everything except get the ID that they say. I have no idea how to use strings. I don't want a script made for me, but i'd rather get a wiki link to what I should use (I'd like to learn it for myself). Here is my current script

local tps=game:GetService("TeleportService")

game.Players.PlayerAdded:connect(function(plr)
	if plr.Name=="Player1" then
		plr.Chatted:connect(function(m)
			if m=="" then -- I don't know what to put here to get the ID they say in the message
				for k,p in pairs (game.Players:GetPlayers()) do
					tps:Teleport( ID ,p)--Once I can isolate the ID i'll put it there
				end
			end
		end)
	end
end)

2 comments