Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Need help with a command?

Asked by
0x72 20
10 years ago

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

Log in to vote
0
Answered by 10 years ago

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
Ad
Log in to vote
0
Answered by 10 years ago

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!

0
Ty, alpha. 0x72 20 — 10y
0
No problem. TheeDeathCaster 2368 — 10y

Answer this question