Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can I Make A Dropper Drop A Certain Model That's In Lighting)?

Hey!

I want to know if I can make a dropper drop a certain model(That is in lighting). Like if I wanted to make the dropper drop a yugioh monster/character that was located in the lighting, could it be possible? I am using this script (ZedNov's Tycoon Kit)

wait(2)
workspace:WaitForChild("PartStorage")

while true do
	wait(1.5) -- How long in between drops
	local part = Instance.new("Part",workspace.PartStorage)
	part.BrickColor=script.Parent.Parent.Parent.DropColor.Value
	part.Material=script.Parent.Parent.Parent.MaterialValue.Value
	local cash = Instance.new("IntValue",part)
	cash.Name = "Cash"
	cash.Value = 5 -- How much the drops are worth
	part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.4,0)
	part.FormFactor = "Custom"
	part.Size=Vector3.new(1.2, 1.2, 1.2) -- Size of the drops
	part.TopSurface = "SmoothNoOutlines"
	part.BottomSurface = "SmoothNoOutlines"
	game.Debris:AddItem(part,20) -- How long until the drops expire
end

Thanks If You Can Help! Kind Regards Truly,

TheUniPiggy

1 answer

✓ Accepted answer

Instead of creating the new part as an instance and changing all of these stats, you could have a part inside of ReplicatedStorage and use :Clone() to clone the part and just change the parent to Workspace and the position to script.Parent.Drop.CFrame - Vector3.new(0,1.4,0) and already have a cash inside the part as an IntValue and then add it to Debris after however long.

Create part First create a part inside of the > Replicated Storage < and put an IntValue inside of the part with however much money

wait()
local RS = game.ReplicatedStorage -- Gets the replicated Storage

while true do --Repeats
local NewPart = RS.PartName:Clone() -- Creates the clone
NewPart.Parent = workspace -- Adds it to workspace
NewPart.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.4,0) -- Sets the position
local cash = NewParent.IntValue
game.Debris:AddItem(part,20) -- How long until the drops expire
end

If this helps then remember to accept the answer, if not then comment or message me about how I could have done better to help you!

1 comment

0

Could you post the code in LUA for me please? Thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.