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

map chooser that tps you to the map?

im trying to make a map chooser that chooses the map! and then teleports them to the map,but when i add the teleporter and test it out nothing works!



wait(2)
maps = {}
Inform=Instance.new("Message",Workspace)
blank=""
RoundTime = 120

for i,v in pairs (game.Lighting:GetChildren()) do
if v:IsA'Model' then 
table.insert(maps, v.Name)
end
end
while true do
randomMap = maps[math.random(1,#maps)]
SelectedMap=game.Lighting:WaitForChild(randomMap):Clone()
SelectedMap.Parent=game.Workspace
Inform.Text="Map chosen: "..SelectedMap.Name
local player = game.Players:GetPlayers()
for i = 1, #player do
player[i].Character:MoveTo(Vector3.new(-31, 207.8, 16)
end
wait(3)
Inform.Text=blank
wait(RoundTime)
SelectedMap:Destroy()
end

the script is supposed to choose the map,so far i only made one,and when the script chooses it it teleports you to a position,but nothing works! can anyone help me?

4 comments

0

Do the humanoid root part

0

Have you heard of the tab key?

0

yea i did

0

then use the tab key

1 answer

✓ Accepted answer

Do the humanoid root part not the character

11 comments

0

ok ill try it out

0

it does teleport me,but not my whole character,my body is left behind!

0

Maybe do torso too

0

ok

0

If R15 then UpperTorso if R6 then Torso

0

ok thanks! this will be the final test,since my character is R15 i will do upper torso,and my game R15!

0

Oh

0

the problem is that the Humaniod Root Part is detached from my body! but it did teleport my whole body,HRT is detached

0

Could you do both?

0

Oh Set the CFrame Of The Character to the part dont use vector3

0

thanks!

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