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: How do I fix this random teleport spawn point

Previous Thread :: Next Thread 
brayden99 is not online. brayden99
Joined: 30 Sep 2007
Total Posts: 1243
12 Oct 2011 02:53 PM
Eveything is good but the 6th line how do I write it?



plr=script.Parent.Parent.Parent.Parent
char=plr.Character
function tele()
if char:FindFirstChild("Torso")~=nil then
torso=char:FindFirstChild("Torso")
spawn=game.Workspace.math.random(1, #"RedSpawn1,RedSpawn2")
torso.CFrame=CFrame.new(spawn.Position.x, spawn.Position.y+10, spawn.Position.z)
game.Lighting.Gun:Clone().Parent = plr.Backpack
script.Parent:Remove()
end
end
script.Parent.button.MouseButton1Click:connect(tele)
Report Abuse
Lightmaster9 is not online. Lightmaster9
Joined: 14 May 2009
Total Posts: 8659
12 Oct 2011 03:02 PM
Output, then I don't have to read it and I can just figure it out. :)
Report Abuse
Lightmaster9 is not online. Lightmaster9
Joined: 14 May 2009
Total Posts: 8659
12 Oct 2011 03:02 PM
SOrry, I didn't read your post properly, I'll check the 6th line (I hate these moments...).
Report Abuse
brayden99 is not online. brayden99
Joined: 30 Sep 2007
Total Posts: 1243
12 Oct 2011 03:04 PM
Thats okay lol but do you know whats wrong?
Report Abuse
Lightmaster9 is not online. Lightmaster9
Joined: 14 May 2009
Total Posts: 8659
12 Oct 2011 03:05 PM
spawn = {"Redspawn1","Redspawn2"}
torso.Parent:MoveTo(workspace[spawn[math.random(1,#spawn)]],Position + Vector3.new(0,10,0))

Just a guess, I haven't tested it.
Report Abuse
Lightmaster9 is not online. Lightmaster9
Joined: 14 May 2009
Total Posts: 8659
12 Oct 2011 03:06 PM
Correct the simple errors if tehere is any... like if there's a "," that looks liek it should be a ".", change it to a ".". I am tired... I am useless... at times. And I'm very weird :D
Report Abuse
newnoahdain is not online. newnoahdain
Joined: 07 Jan 2010
Total Posts: 217
12 Oct 2011 03:06 PM
(I might be wrong, I am new to scripting) Try:


plr=script.Parent.Parent.Parent.Parent
char=plr.Character
function tele()
if char:FindFirstChild("Torso")~=nil then
torso=char:FindFirstChild("Torso")
spawn=game.Workspace[math.Random(1, #"RedSpawn1,RedSpawn2")]
torso.CFrame=CFrame.new(spawn.Position.x, spawn.Position.y+10, spawn.Position.z)
game.Lighting.Gun:Clone().Parent = plr.Backpack
script.Parent:Remove()
end
end
script.Parent.button.MouseButton1Click:connect(tele)
Report Abuse
brayden99 is not online. brayden99
Joined: 30 Sep 2007
Total Posts: 1243
12 Oct 2011 03:07 PM
Doesnt work :/
Report Abuse
brayden99 is not online. brayden99
Joined: 30 Sep 2007
Total Posts: 1243
12 Oct 2011 03:08 PM
Both of you guys were wrong xD
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