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

anything i should add to this script?

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())

2 comments

0

In box the code

0

Up vote my statement if this should not be on scripting helpers.

1 answer

✓ Accepted answer

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

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