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
 

Math.random question:

Previous Thread :: Next Thread 
Xucs is not online. Xucs
Joined: 23 Jul 2010
Total Posts: 11844
15 May 2015 03:31 PM
If you were to make it so when you clicked a button, you would spawn in possibly several different locations [8 possible spawns]
Would it be something like this?
(Here's my whole script for the textbutton so far)

p = game.Players.LocalPlayer
c = p.Character
l = game.Lighting
m = game.Workspace.Teleports
script.Parent.MouseButton1Click:connect(function()
l.Pistol:Clone().Parent = p.Backpack
m:GetChildren() -- I'm guessing you would have to use that, then c.Torso.CFrame = CFrame.new(math.random(#)), and I know this is completely wrong, but I haven't had any experience with it before.
if c.Humanoid.Health<=0 then
p.Backpack:FindFirstChild('Pistol'):Destroy()
end
end)




Leveraged/tixmaker101 + 55k posts |
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
15 May 2015 03:36 PM
its not good to scam little kids tbh.. im sry but i have to tell u that just to let u know

because karma will get to u some day i feel sorry for u :'(
Report Abuse
Xucs is not online. Xucs
Joined: 23 Jul 2010
Total Posts: 11844
15 May 2015 03:40 PM
@verbal

Ik I feel sorry for you :c

Karma is mean, so better watch out!



Leveraged/tixmaker101 + 55k posts |
Report Abuse
Xucs is not online. Xucs
Joined: 23 Jul 2010
Total Posts: 11844
15 May 2015 03:43 PM
But for real, any help?



Leveraged/tixmaker101 + 55k posts |
Report Abuse
Xucs is not online. Xucs
Joined: 23 Jul 2010
Total Posts: 11844
15 May 2015 03:46 PM
...



Leveraged/tixmaker101 + 55k posts |
Report Abuse
Compunction is not online. Compunction
Joined: 18 Mar 2013
Total Posts: 12661
15 May 2015 03:50 PM
scammers shouldn't receive help :^(

👆 A feeling of guilt or moral scruple that follows the doing of something bad 👆
Report Abuse
Xucs is not online. Xucs
Joined: 23 Jul 2010
Total Posts: 11844
15 May 2015 03:56 PM
@compunction

Implying I scam :^(



Leveraged/tixmaker101 + 55k posts |
Report Abuse
uglypoe is not online. uglypoe
Joined: 26 Mar 2011
Total Posts: 4382
15 May 2015 03:56 PM
m = game.Workspace.Teleports
c = p.Character

script.Parent.MouseButton1Click:connect(function()
local chosen = math.random(8)
if chosen == "1" then
c.Torso.CFrame = CFrame.new()
else
if chosen == "2" then
c.Torso.CFrame = CFrame.new()
else
if chosen == "3" then
c.Torso.CFrame = CFrame.new()
else
if chosen == "4" then
c.Torso.CFrame = CFrame.new()
else
if chosen == "5" then
c.Torso.CFrame = CFrame.new()
else
if chosen == "6" then
c.Torso.CFrame = CFrame.new()
else
if chosen == "7" then
c.Torso.CFrame = CFrame.new()
else
if chosen == "8" then
c.Torso.CFrame = CFrame.new()
end end end end end end end end end

The Ugliest Poe on LMaD ( ͡° ͜ʖ ͡°) // Was grounded for a week RIP // RAP: 18,315
Report Abuse
Xucs is not online. Xucs
Joined: 23 Jul 2010
Total Posts: 11844
15 May 2015 03:58 PM
@ugly

That may work, but I'm sure there's a more efficient way?



Leveraged/tixmaker101 + 55k posts |
Report Abuse
uglypoe is not online. uglypoe
Joined: 26 Mar 2011
Total Posts: 4382
15 May 2015 04:00 PM
Of course there is a more efficient way
But scammers don't get to know it :^)

The Ugliest Poe on LMaD ( ͡° ͜ʖ ͡°) // Was grounded for a week RIP // RAP: 18,315
Report Abuse
Xucs is not online. Xucs
Joined: 23 Jul 2010
Total Posts: 11844
15 May 2015 04:00 PM
Rofl.

Just because some jealous kid says I scam means I do?

k



Leveraged/tixmaker101 + 55k posts |
Report Abuse
uglypoe is not online. uglypoe
Joined: 26 Mar 2011
Total Posts: 4382
15 May 2015 04:01 PM
be happy w/ what I gave you m8
itll work

The Ugliest Poe on LMaD ( ͡° ͜ʖ ͡°) // Was grounded for a week RIP // RAP: 18,319
Report Abuse
Xucs is not online. Xucs
Joined: 23 Jul 2010
Total Posts: 11844
15 May 2015 04:04 PM
@ugly

Never said it wouldn't, but I don't like being randomly accused of scamming, nobody does.



Leveraged/tixmaker101 + 55k posts |
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
15 May 2015 04:07 PM
people dont like being scammed
Report Abuse
Xucs is not online. Xucs
Joined: 23 Jul 2010
Total Posts: 11844
15 May 2015 04:09 PM
@Verbal

Which is why you shouldn't scam



Leveraged/tixmaker101 + 55k posts |
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
15 May 2015 04:15 PM
http://www.roblox.com/Forum/ShowPost.aspx?PostID=161038238
Report Abuse
Xucs is not online. Xucs
Joined: 23 Jul 2010
Total Posts: 11844
15 May 2015 04:16 PM
Implying this matters?



Leveraged/tixmaker101 + 55k posts |
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
15 May 2015 04:19 PM
im sorry for bothering you i was just hoping you would stop doing bad

hopefully u learn some day

ill go now sry 4 bothering u
Report Abuse
Xucs is not online. Xucs
Joined: 23 Jul 2010
Total Posts: 11844
15 May 2015 04:19 PM
i hope u lern somedy 2
ok bye 4now



Leveraged/tixmaker101 + 55k posts |
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