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
 

Spawn teleportation help

Previous Thread :: Next Thread 
blindbird17 is not online. blindbird17
Joined: 23 Jan 2012
Total Posts: 1027
08 Oct 2012 02:52 PM
This is my script that teleports a player and it's supposed to teleport my spawns but it only teleports the player:
player = script.Parent.Parent.Parent.Parent
repeat wait() until player.Character

function onClick()
if player.Character:findFirstChild("Torso") then
player.Character:MoveTo(Vector3.new(19, 20, -14))
game.Workspace.SpawnLocation.CFrame = CFrame.new(21, 7, -17)--CHANGE
game.Workspace.SpawnLocation.CFrame = CFrame.new(83, 6, 159)
end
end
script.Parent.MouseButton1Down:connect(onClick)

script.Parent.MouseButton2Down:connect(function()
script.Parent.Parent:remove()
end)

(I added the change to remind myself to change the location)
Some forum person locked my last post of this for some reason. Idk why.
Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
08 Oct 2012 03:00 PM
player = script.Parent.Parent.Parent.Parent
repeat wait() until player.Character

function onClick()
if player.Character:findFirstChild("Torso") then
player.Character:MoveTo(Vector3.new(19, 20, -14))
game.Workspace.SpawnLocation.CFrame = CFrame.new(Vector3.new(21, 7, -17))--CHANGE
game.Workspace.SpawnLocation.CFrame = CFrame.new(Vector3.new(83, 6, 159))
end
end
script.Parent.MouseButton1Down:connect(onClick)

script.Parent.MouseButton2Down:connect(function()
script.Parent.Parent:remove()
end)
Report Abuse
xFortunato is not online. xFortunato
Joined: 25 Nov 2010
Total Posts: 865
08 Oct 2012 03:44 PM
@blindbird17
I highly doubt anyone but yourself disabled replies to your post. You probably, unaware of what it actually did, accidentally checked 'Do not allow replies to this post.'
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