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: Gui Script HELP PLEASE

Previous Thread :: Next Thread 
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
26 Jun 2014 02:42 PM
Essentially my gui has 5 options you pick one it spawns you to a random block named 1 2 3 or 4 I also have a map script to scroll through my maps and I want to make the blocks namde 1 2 3 or 4 specified within them so I grouped them into the lighting for each map, my function is supposed to find those but I don't know how to do it 1 2 3 and 4 are not grouped inside of the maps so they are still just labeled 1 2 3 4. Please help

function FindSpawns ()
if workspace:findFirstChild("Map1") then
local spawns
spawns = workspace.Map1:GetChildren()
else if (workspace:findFirstChild("Map2")) then
local spawns = {}
spawns2 = workspace.Map2:GetChildren()
else if (workspace:findFirstChild("Map3")) then
local spawns = {}
spawns2 = workspace.Map3:GetChildren()
end


function OnClicked()
wait (5)
spawns = {"1","2","3","4"} --Names of the bricks that are used for spawns
spawn = spawns[math.random(1,#spawns)]
actual = game.Workspace:findFirstChild(spawn)
game.Players.LocalPlayer.Character.Torso.CFrame = Workspace[math.random(4)].CFrame -- teleports person from neutral spawn to whatever your spawns are set to.
end
script.Parent.Main.Assault.MouseButton1Up:connect(OnClicked)
script.Parent.Main.Commando.MouseButton1Up:connect(OnClicked)
script.Parent.Main.Sniper.MouseButton1Up:connect(OnClicked)
script.Parent.Main.Scout.MouseButton1Up:connect(OnClicked)
script.Parent.Main.Demolition.MouseButton1Up:connect(OnClicked)
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
26 Jun 2014 03:27 PM
.
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
26 Jun 2014 03:57 PM
.
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
26 Jun 2014 10:02 PM
Help please :)
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