Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Devil fruit spawn script?

Asked by
sumi27 0
8 years ago

hi, im making a one piece game but need the df spawn script someone can tell me how is it?

0
you could try to clone the fruits from Replicated Storage, and make them spawn at random spawns in workspace. yoshi8080 445 — 8y
0
This is a request. You should have some code for us to work with. However if your question was like how would I make a spawn script that would be better. Conmmander 479 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago

Assuming you want random things to spawn in random places, make a model named "Spawns" and place parts where you want things to spawn then use this script:

local Spawns = workspace:WaitForChild("Spawns")
local WaitTime = 5 -- Change 5 to the time between something spawning
local PartBeingSpawned = game.ReplicatedStorage:WaitForChild("ITEM") -- Change ITEM to what's being spawned

while wait(WaitTime) do
    local Part = PartBeingSpawned:Clone()
    local Spawn = Spawns:GetChildren()[math.random(1,#Spawns:GetChildren())]
    Part.Position = Spawn.Position
    Part.Parent = workspace
end
0
thx it worked!! sumi27 0 — 8y
Ad

Answer this question