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 » Scripting Helpers
Home Search
 

Re: Teleport Script [CONTINUED]

Previous Thread :: Next Thread 
XerilVenice is not online. XerilVenice
Joined: 08 Jan 2011
Total Posts: 166
18 Dec 2013 03:02 PM
I'm having problem teleporting everyone into the same place. The code is below. Any help would be greatly appreciated.

local Time = 180
local Hint = Instance.new("Hint")

while wait() do
Hint.Parent = Workspace
repeat wait() Hint.Text = "You require more than two players to start!" until game.Players.NumPlayers >= 2
Hint.Parent = nil

wait(5)

local hint = Instance.new("Hint",Workspace)
hint.Text = "Teleporting will commence in 5 seconds!"

wait(5)

hint:Destroy() -- Pretty simple I guess

for _,v in pairs(game.Players:GetPlayers()) do
if v.Character then
v.Character:MoveTo(Vector3.new(-635.6, 504.6, 518.6))

if v.Character.Vector3.new(-635.6, 504.6, 518.6) then

v.Character = nil

end

end

end
end
Report Abuse
shonclub is not online. shonclub
Joined: 05 Sep 2009
Total Posts: 1331
18 Dec 2013 03:17 PM
if v.Character.Vector3.new(-635.6, 504.6, 518.6) then

should be

if v.Chacter.Torso.CFrame == Vector3.new(-635.6, 504.6, 518.6) then

Vector3 isn't a property of Character (A model)
Report Abuse
XerilVenice is not online. XerilVenice
Joined: 08 Jan 2011
Total Posts: 166
18 Dec 2013 10:51 PM
Ah okay. Thanks.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
19 Dec 2013 02:13 PM
local Time = 180
local h = Instance.new("Hint", game.Workspace)

while wait() do
repeat wait() h.Text = "You require more than two players to start!" until game.Players.NumPlayers >= 2
if game.Players.NumPlayers <= 2 then
h:remove()
end

wait(5)

local h = Instance.new("Hint", game.Workspace)
h.Text = "Teleporting will commence in 5 seconds!"
wait(5)
h:remove()

for _,v in pairs(game.Players:GetPlayers()) do
if v.Character then
v.Character.Torso.CFrame = CFrame.new(-635.6, 504.6, 518.6)

if v.Character.Torso.CFrame.new(-635.6, 504.6, 518.6) then
v.Character = nil
end end end end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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