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