local CrateCreater = game.Workspace.ScriptTest.ScriptTest function CreateCrate() for _, object in pairs(game.Workspace:GetChildren()) do local CrateCopy = game.ServerStorage.CrateToDrop:Clone() CrateCopy.Parent = game.Workspace.PartStorage end end CrateCreater.Touched:connect(CreateCrate) while wait(1) do CreateCrate() end
Here is my script. Right now I want to say: "Hey you! you have to spawn there (x,y,z) How to do that? I'm making a tycoon with the berezaa tycoon-pack. this is his dropper script:
wait(2) workspace:WaitForChild("PartStorage") while true do wait(1) -- How long in between drops local part = Instance.new("Part",workspace.PartStorage) part.BrickColor=script.Parent.Parent.Parent.DropColor.Value local cash = Instance.new("IntValue",part) cash.Name = "Cash" cash.Value = 1 -- How much the drops are worth part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1,0) part.Size=Vector3.new(1,1,1) -- Size of the drops game.Debris:AddItem(part,20) -- How long until the drops expire end
So, my big question is: How to drop the union I made instead of the stupid (1,1,1) sized brick?
wait(2) while true do wait(1) -- How long in between drops local part = union --a reference to your union local cash = Instance.new("IntValue",part) cash.Name = "Cash" cash.Value = 1 -- How much the drops are worth part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1,0) game.Debris:AddItem(part,20) -- How long until the drops expire end
That won't clone your union, it'll just drop it in. If you want to clone it, reference your union and stick :Clone() on the end, then parent the clone to the workspace at the end of the script.