Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Need help with a command?

I tried ;

if msg == "tp/all/me" then
for _, v in pairs(Game:GetService("Players"):GetPlayers()) do
    v.Character.Torso.CFrame = CFrame.new(Workspace["0x14"].Torso.Position)
end
end
end)

Also ;

if msg == "tp/all/me" then

	for i,v in pairs(game.Players:GetChildren())do
v.Character.Torso.Position = Workspace['0x14'].Torso.Position
	end
end
end)

2 answers

The code you provided includes unnecessary syntax relative to the sample - such as extra ends and closing parenthesis.

Please run your script through the Output and return with any errors you produce.

For the sake of convenience, I suggest you use the following line accordingly:

v.Character.Torso.CFrame = Workspace["0x14"].Torso.CFrame

Hmm, try this;

local Admins = {"Your name here"}

game.Players.PlayerAdded:connect(function(plr)
for i,v in pairs(Admins)do
if plr.Name:lower()==v:lower()then
plr.Chatted:connect(function(msg)

if msg:lower()=="tptome"then
for i , v in pairs(game.Players:GetChildren())do
if v:IsA("Player")then
if v and v.Character and v.Character:FindFirstChild("Torso")and plr and plr.Character and plr.Character:FindFirstChild("Torso")then
v.Character.Torso.CFrame=CFrame.new(plr.Character.Torso.Position+Vector3.new(0,3,0))
end
end
end
end


end)
end
end
end)

Hope this helped!

2 comments

0

Ty, alpha.

0

No problem.

This discussion is preserved as it was. New answers, comments, and votes are closed.