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
 

Re: I need help with a looting system.

Previous Thread :: Next Thread 
Ghostliest is not online. Ghostliest
Joined: 09 May 2015
Total Posts: 1455
17 May 2015 10:58 PM
I have already made a inventory UI, a thirst and hunger gui, the tools, the only, and I know it is a stupid question, but I need help with a loot system, so in the selected area (set up as a can-collide invisble part) the selected tools will spawn in that area, please help with this.
Report Abuse
Ghostliest is not online. Ghostliest
Joined: 09 May 2015
Total Posts: 1455
17 May 2015 11:02 PM
All it needs to do is

clone the tool

spawn it in a certain area within a certain amount of time

and just spawn it randomly within that area
Report Abuse
mycheeze is not online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
17 May 2015 11:05 PM
local A = game:GetService('ServerStorage'):WaitForChild('Put Name Here'):Clone()

A.CFrame = CFrame.new(Workspace:WaitForChild('Invisible Part').Position))

game:GetService('Debris'):AddItem(A, Time)

You may want to make a table containing all invisible parts, use math.random to randomize which area it spawns in (and another math.random) to offset it from the original coordinates.
Report Abuse
Ghostliest is not online. Ghostliest
Joined: 09 May 2015
Total Posts: 1455
17 May 2015 11:10 PM
Could you maybe simplify that a little bit? Where to put it? How to set it up? Thanks.
Report Abuse
Ghostliest is not online. Ghostliest
Joined: 09 May 2015
Total Posts: 1455
17 May 2015 11:15 PM
Someone please help.
Report Abuse
Ghostliest is not online. Ghostliest
Joined: 09 May 2015
Total Posts: 1455
17 May 2015 11:19 PM
Please, I have little scripting knowledge about this subject at all.
Report Abuse
mycheeze is not online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
17 May 2015 11:20 PM
Take all of your invisible/non-collidable parts and put them in a single model.

Then do the following

local A = Workspace:WaitForChild('Put the model name here'):GetChildren()
local B = game:GetService('ServerStorage'):WaitForChild('Put the tool name here'):Clone()
B.CFrame = CFrame.new(A[math.random(1, #A)].Position)
B.Parent = Workspace
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
17 May 2015 11:21 PM
local tool1 = game.ServerStorage.Tool1
local tool1Clone = tool1:Clone()
tool1Clone.Parent = game.Workspace
tool1Clone:MoveTo(game.Workspace.SpawnArea1.Position)
wait(math.random(60,120))
tool1Clone:MoveTo(game.Workspace.SpawnArea2.Position)
--etc


Report Abuse
Ghostliest is not online. Ghostliest
Joined: 09 May 2015
Total Posts: 1455
17 May 2015 11:22 PM
Thanks guys, that was easy, I couldn't find any info on the internet regarding this.
Report Abuse
Ghostliest is not online. Ghostliest
Joined: 09 May 2015
Total Posts: 1455
17 May 2015 11:27 PM
Nevermind, none of these are working I have the script in ServerScripts.
Report Abuse
mycheeze is not online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
17 May 2015 11:29 PM
Well you need to tell us where you are putting the tools (are all tools in the starterpack/serverstorage?)

You are going to have to chip in things like (where are the invisible spawn parts, tools) and some more bits of information so we can better help you.

S0wwy ;-;
Report Abuse
Ghostliest is not online. Ghostliest
Joined: 09 May 2015
Total Posts: 1455
17 May 2015 11:30 PM
Toolname = Bacon_Jerky

The tool is in ServerStorage

Report Abuse
Ghostliest is not online. Ghostliest
Joined: 09 May 2015
Total Posts: 1455
17 May 2015 11:32 PM
The Invisible part is simply named "Invisible" it is in the workspace.
Report Abuse
Ghostliest is not online. Ghostliest
Joined: 09 May 2015
Total Posts: 1455
17 May 2015 11:39 PM
Please help.
Report Abuse
mycheeze is not online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
17 May 2015 11:39 PM
I = Workspace:WaitForChild('Invisible')
T = game:GetService('ServerStorage'):WaitForChild('Bacon_Jerky'):Clone()

T.CFrame = CFrame.new(
math.random(I.Position.X - I.Size.X/2, I.Position.X + I.Size.X),
I.Position.Y,
math.random(I.Position.Z - I.Size.Z/2, I.Position.Z + I.Size.Z))

T.Parent = Workspace

This should take the two dimensions being X and Z and calculate a randomized position from any area inside the part, but always being at the same height.
Report Abuse
mycheeze is not online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
17 May 2015 11:39 PM
oh I forgot, I don't know how to move tools q-q

You are going to have to use something like :MoveTo() or :TranslateTo()

sowwy m8

but the rest sh00d b c0vered
Report Abuse
Ghostliest is not online. Ghostliest
Joined: 09 May 2015
Total Posts: 1455
17 May 2015 11:44 PM
I have no further knowledge on this subject matter, I don't know anything about tool api, or anything about this, but I'm assuming it should simply be a

Bacon_Jerky.Parent = (the thing)

but thanks, that did not work, so.
Report Abuse
Ghostliest is not online. Ghostliest
Joined: 09 May 2015
Total Posts: 1455
17 May 2015 11:46 PM
well, does anyone else have a script.
Report Abuse
Ghostliest is not online. Ghostliest
Joined: 09 May 2015
Total Posts: 1455
17 May 2015 11:50 PM
this could be done easily without any advanced scripts, it can be done by having a tool in the storage, then cloning it, then wait() and move it to the area, without any c.frame, or anything like that.
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
18 May 2015 03:40 AM
then do it
Report Abuse
CrescentJade is not online. CrescentJade
Joined: 07 Jul 2010
Total Posts: 5494
18 May 2015 05:07 AM
I dont like you. this forum is for advanced scriptera. gtfo, ill follow you later.
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