generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: how do i teleport players with # script?

Previous Thread :: Next Thread 
ScriptedCurse is online. ScriptedCurse
Joined: 18 Jan 2013
Total Posts: 8282
09 Feb 2017 04:43 PM
lets say the intermission just finished, and then the player is moved to a certain spot
what do i do?


i like lua R+://23447021
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
09 Feb 2017 04:44 PM
for i,v in next, game.Players:GetPlayers() do
v.Character:MoveTo(spawns[i].Position)
end


Report Abuse
iExceli is not online. iExceli
Joined: 20 Jul 2016
Total Posts: 56
09 Feb 2017 04:48 PM
Have a model that is named spawns ( or anything ) and put all the blocks where u want the players to go

and when the intermission is done

Spawns = game.Spawns:GetChildren()



for i, v in pairs(game.Players:GetChildren()) do
Players[i].Character:MoveTo(Spawns[i].Position)
end
end

Remember ' i ' is the number so.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
09 Feb 2017 04:54 PM
@ie

v already returns the player

no need to do "players[i]"


Report Abuse
ScriptedCurse is online. ScriptedCurse
Joined: 18 Jan 2013
Total Posts: 8282
09 Feb 2017 04:55 PM
here is my script


local Players = game.Players:GetChildren()
while true do
local Hint = Instance.new("Hint", game.Workspace)
Hint.Text = "nil"

for i = 15,0,-1 do
wait()
Hint.Text = "Minigame will start in | "..i
wait(1)

end

game.ServerStorage.Base1.Parent = game.Workspace

for i = 100,0,-1 do
Hint.Text = "Minigame will end in | "..i
wait(1)
Spawns = game.Spawns:GetChildren()
for i, v in pairs(game.Players:GetChildren()) do
Players[i].Character:MoveTo(Spawns[i].Position)
end
end
end
game.Workspace.Base1.Parent = game.ServerStorage





i like lua R+://23447021
Report Abuse
iExceli is not online. iExceli
Joined: 20 Jul 2016
Total Posts: 56
09 Feb 2017 05:02 PM
You have it inside the for i loop so it will continuously tele u lol
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
09 Feb 2017 05:02 PM
if you go here and click on "edit" you can see everything on how it works

https://www.roblox.com/games/141589692/Basic-Minigame


Report Abuse
iExceli is not online. iExceli
Joined: 20 Jul 2016
Total Posts: 56
09 Feb 2017 05:04 PM
it works fine
Report Abuse
ScriptedCurse is online. ScriptedCurse
Joined: 18 Jan 2013
Total Posts: 8282
09 Feb 2017 05:06 PM
while true do
local Hint = Instance.new("Hint", game.Workspace)
Hint.Text = "nil"

for i = 15,0,-1 do
wait()
Hint.Text = "Minigame will start in | "..i
wait(1)

end

game.ServerStorage["Base1"].Parent = game.Workspace

for i = 100,0,-1 do
Hint.Text = "Minigame will end in | "..i
wait(1)
spawns = game.Workspace["Base1"].spawns
for i,v in next, game.Players:GetPlayers() do
v.Character:MoveTo(spawns[i].Position)
end
end
end
game.Workspace["Base1"].Parent = game.ServerStorage


this says: 1 is not a valid member of Model


i like lua R+://23447021
Report Abuse
iExceli is not online. iExceli
Joined: 20 Jul 2016
Total Posts: 56
09 Feb 2017 05:07 PM
The spawns have to be


spawns = game.Workspace["Base1"].spawns:GETCHILDREN()

make sure thats there
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image