Er1x_Official

Random Area Item Dropper Roblox -- Script

Jun 19th, 2021
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. local cd = 5 -- cooldown
  2. local position
  3.  
  4. while wait(cd) do -- loop
  5.     local folder = script.Folder:GetChildren() -- gets the parts in the folder
  6.     local random = math.random(1,#folder) -- randomizes
  7.     local index = folder[random] -- randomizes the parts
  8.    
  9.     local copy = game.ReplicatedStorage.ClassicSword:Clone() -- tool/item ( JUST CHANGE THE "ClassicSword" )
  10.     copy.Parent = game.Workspace  -- parent
  11.     copy.Handle.CFrame = index.CFrame -- the cframe of the item
  12.    
  13.     position = copy.Handle.Position
  14. end
Advertisement
Add Comment
Please, Sign In to add comment