I am trying to make a Mine for my tycoon. I have a new tycoon kit that is completely differently coded to my old one. My new tycoon kit requires a different dropper script. As my new tycoon kit does not come with a Mine script, I have to edit the script myself, which I could usually do, but clearly not for this.
^^^
That image shows the mine drop script. It is a completely different code/system.
I have tried to copy the click detector line from the original script into the new one, but I am unsure as to where to put it. I am sure this would be a 10 second job for a scripter.
-- debounce = false
script.Parent.Button.ClickDetector.MouseClick:connect(function()
if debounce == false then
debounce = true
script.Parent.Button.BrickColor=BrickColor.new("Bright red")
local part = Instance.new("Part",workspace)
local cash = Instance.new("IntValue",part)
cash.Name = "Cash"
part.BrickColor=script.Parent.Parent.Parent.DropColor.Value
cash.Value = 10
part.CFrame = script.Parent.Drop.CFrame
part.Size=Vector3.new(1,1,1)
game.Debris:AddItem(part,20)
wait(0.2) -- Time to wait in between clicks
debounce = false
script.Parent.Button.BrickColor=BrickColor.new("Bright green")
end
end)
if script.Parent.Dropper.Value.Parent.Parent.Parent.Properties.Owner.Value ~= nil then
while true do
local dropperProp = script.Parent.Dropper.Value
local part = Instance.new("Part"); part.Size = Vector3.new(.5,.5,.5); part.Position = script.Parent.dropPos.WorldPosition
part.CollisionGroupId = 1
local sMesh = Instance.new("SpecialMesh"); sMesh.MeshId = dropperProp.MeshId.Value; sMesh.TextureId = dropperProp.TextureId.Value; sMesh.Scale = dropperProp.sizeMesh.Value; sMesh.Parent = part;
local cash = Instance.new("NumberValue"); cash.Name = "Cash"; cash.Value = dropperProp.Cash.Value; cash.Parent = part
local cashSaver = game:GetService("ServerStorage").cashSaver:Clone(); cashSaver.Parent = part
part.Parent = dropperProp.Parent.Parent.Parent.tycoonThings.dropFolder
cashSaver.Disabled = false
wait(script.Parent.dropTime.Value)
end
end
local Activated = false
script.Parent.MouseClick:Connect(function()
if not Activated then
Activated = true
script.Parent.Parent.BrickColor = BrickColor.new("Really red")
local P = Instance.new("Part", workspace)
P.Position = script.Parent.Parent.Position + Vector3.new(0,5,2)
wait(1) -- Delay, Increase or Decrease if you want.
Activated = false
script.Parent.Parent.BrickColor = BrickColor.new("Lime green")
end
end)
okay so my new drop script (that was retrieved from a DROPPER) does not come with a Mine script.
It has a new system, it uses a folder instead of a leaderboard for cash.
Wheras my old tycoon did have a mine, it uses the old leaderboard drop script. I am trying to make a Mine by copying the new script into the old one, and trying to add the click detector. I also want the button to turn red and then green once pressed.
I don’t exactly do commissions, idk, i guess? Im not a great scripter but i might be able to help, i dont exactly like people giving robux to me because i help them.
Did you make the scripts? They are not supposed to work the same way. The old one presumably requires the player to click on a part in order for some “ore” (I assume) to spawn, while the new one just has an infinite loop that spawns these ores automatically.
If you want the new script to behave similarly to the old script, I would probably replace the while loop with the click detector event. However, I’m unsure what you are actually trying to achieve. Perhaps this?:
script.Parent.Button.ClickDetector.MouseClick:connect(function()
local dropperProp = script.Parent.Dropper.Value
local part = Instance.new("Part"); part.Size = Vector3.new(.5,.5,.5); part.Position = script.Parent.dropPos.WorldPosition
part.CollisionGroupId = 1
local sMesh = Instance.new("SpecialMesh"); sMesh.MeshId = dropperProp.MeshId.Value; sMesh.TextureId = dropperProp.TextureId.Value; sMesh.Scale = dropperProp.sizeMesh.Value; sMesh.Parent = part;
local cash = Instance.new("NumberValue"); cash.Name = "Cash"; cash.Value = dropperProp.Cash.Value; cash.Parent = part
local cashSaver = game:GetService("ServerStorage").cashSaver:Clone(); cashSaver.Parent = part
part.Parent = dropperProp.Parent.Parent.Parent.tycoonThings.dropFolder
cashSaver.Disabled = false
wait(script.Parent.dropTime.Value)
end)
It would be very helpful if you could actually explain what the scripts are supposed to do.