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
 

random gun spawning

Previous Thread :: Next Thread 
misthero21 is not online. misthero21
Joined: 05 Jan 2013
Total Posts: 552
03 Oct 2017 05:29 AM
so i have made a weapon pick up script (NOTICE THAT IM ONLY LEARNING)
like press that to pick up... blah blah and so on
and i used model so they cant pick it up by walking on it but when they pick up it never respawns because i clearly dont really know how to make such script

example how i want my respawning to be :
i pick it up it dissapears but after time i want the model not the tool to respawn BUT
i want it randomised like spawnscript=(spawn either pistol,rifle or knife) MODELS AND NOT TOOLS also i want it in certain time like RespawnTime = 240 math.random models and so on.

please help i will be very grateful!


GOLDENBOI
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
03 Oct 2017 05:38 AM
you said you had a script and that you can't make a script - - --- -- - #### if you have a script, post one (even if it is incomplete) if you don't have a script, make one try looking at specific parts of scripting you don't understand, and concentrate on learning and getting help on those, instead of taking an advanced problem and then thinking "i can't do it, someone do it for me"
Report Abuse
misthero21 is not online. misthero21
Joined: 05 Jan 2013
Total Posts: 552
03 Oct 2017 05:40 AM
tools = game.ServerStorage.edgys:GetChildren()
Locations = {{-871.227, 1.723, 805.254}}

function tool()
local toolselected = tools[math.random(1,#tools)]:Clone()
toolselected.Handle.CFrame = CFrame.new(Locations[math.random(1, #Locations)].Position)
end

tool()

yea okay help me with this


GOLDENBOI
Report Abuse
misthero21 is not online. misthero21
Joined: 05 Jan 2013
Total Posts: 552
03 Oct 2017 05:43 AM
the other script doesnt have anything to do with respawning it just a script to pick up tools from the ground by clicking button but for that i made a model pistol and a tool that sits in serverstorage and if i stand on the model i press the button and the model dissapears and i get the tool


GOLDENBOI
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
03 Oct 2017 05:48 AM
Locations = {{-871.227, 1.723, 805.254}}

with that ^^^^ for what you have going on, it might be easier just to go ahead and store vector3 values in the table

Locations = {Vector3.new(-871.227, 1.723, 805.254)}

---------

toolselected.Handle.CFrame = CFrame.new(Locations[math.random(1, #Locations)].Position)

for this one, you would just want to take off the .Position

toolselected.Handle.CFrame = CFrame.new(Locations[math.random(1, #Locations)]
Report Abuse
misthero21 is not online. misthero21
Joined: 05 Jan 2013
Total Posts: 552
03 Oct 2017 05:51 AM
still doesnt spawn but the errors are gone thanks and i still need to add a timer like when to respawn again


GOLDENBOI
Report Abuse
misthero21 is not online. misthero21
Joined: 05 Jan 2013
Total Posts: 552
03 Oct 2017 09:15 AM
i still need help


GOLDENBOI
Report Abuse
misthero21 is not online. misthero21
Joined: 05 Jan 2013
Total Posts: 552
03 Oct 2017 12:29 PM
still need help :/


GOLDENBOI
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