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

anything i should add to this script?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Is there anything i need to add to this script? its suppose to teleport 2 people to a certain spot in the place am i suppose to CFrame.new(0,0,0) if so do i add 2 positions? sorry i am very very new at scripting D:

local allPlayers = {}
for a,v in pairs(game.Players:Getchildren()) do 
        table.insert(allPlayers,v)
end
local plrAmount = game.Players.Numplayers
local val1 = math.random(plrAmount)
lolcal val2 
repeat
    val2 - math.random(plrAmount)
    wait()
until val2 ~=val1
allPlayers[val1].Character.Torso.CFrame = CFrame.new(0,0,0)
allplayers[val2].Character/Torso.CFrame = CFrame.new(0,0,0)
math.randomseed(os.time())

0
In box the code GreekGodOfMLG 244 — 8y
0
Up vote my statement if this should not be on scripting helpers. FiredDusk 1466 — 8y

1 answer

Log in to vote
0
Answered by
Validark 1580 Snack Break Moderation Voter
8 years ago

On line 7, you mispelled local, at lolcal val2.

On line 13, you have a / instead of a .

allplayers[val2].Character/Torso.CFrame --incorrect
allplayers[val2].Character.Torso.CFrame --correct
Ad

Answer this question