|
| 20 Oct 2015 08:40 PM |
So I'm trying to make a tycoon that drops a union, which is painful because I usually make it make parts, which is a lot easier. debounce = false script.Parent.Button.ClickDetector.MouseClick:connect(function() if debounce == false then debounce = true local Rock = Instance.new("UnionOperation",workspace) UnionOperation.BrickColor=script.Parent.Parent.Parent.DropColor.Value cash.Value = 1 Rock.CFrame = script.Parent.Drop.CFrame Rock.Size=Vector3.new(0.6, 1.4, 1.4) game.Debris:AddItem(Rock,20) wait(0.2) -- Time to wait in between clicks debounce = false end end)
|
|
|
| Report Abuse |
|
|
|
| 20 Oct 2015 08:52 PM |
| clone a union you want and position it at the droper |
|
|
| Report Abuse |
|
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
|
| 20 Oct 2015 08:52 PM |
| what's messing up or erroring? |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2015 08:54 PM |
| So here is what happens, it makes a new empty union, not the actually rock. |
|
|
| Report Abuse |
|
|
| |
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
|
| 20 Oct 2015 09:15 PM |
| You named local Rock then you did Instance.new for a Union Operation and then called it UnionOperation instead of Rock |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2015 09:18 PM |
When I named it before as Rock, it said 19:17:50.523 - Unable to create an Instance of type "Rock" |
|
|
| Report Abuse |
|
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
|
| 20 Oct 2015 09:23 PM |
debounce = false script.Parent.Button.ClickDetector.MouseClick:connect(function() if debounce == false then debounce = true local Rock = Instance.new("UnionOperation",workspace) if part:IsA("UnionOperation") then BrickColor=script.Parent.Parent.Parent.DropColor.Value cash.Value = 1 CFrame = script.Parent.Drop.CFrame Size=Vector3.new(0.6, 1.4, 1.4) game.Debris:AddItem(Rock,20) wait(0.2) -- Time to wait in between clicks debounce = false end end)
try that idk |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2015 09:29 PM |
No, it does not work, I've edited your suggested script around, yet that all the attempts still didn't work, here are my edits. debounce = false script.Parent.Button.ClickDetector.MouseClick:connect(function() if debounce == false then debounce = true local Rock = Instance.new("UnionOperation",workspace) if UnionOperation:IsA("Rock") then BrickColor=script.Parent.Parent.Parent.DropColor.Value cash.Value = 1 Rock.CFrame = script.Parent.Drop.CFrame Rock.Size=Vector3.new(0.6, 1.4, 1.4) game.Debris:AddItem(Rock,20) wait(0.2) -- Time to wait in between clicks debounce = false end
|
|
|
| Report Abuse |
|
|
|
| 20 Oct 2015 09:31 PM |
"if UnionOperation:IsA("Rock") then"
>.< |
|
|
| Report Abuse |
|
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
|
| 20 Oct 2015 09:32 PM |
if Rock:IsA("UnionOperation") then Rock.BrickColor=script.Parent.Parent.Parent.DropColor.Value cash.Value = 1 Rock.CFrame = script.Parent.Drop.CFrame Rock.Size=Vector3.new(0.6, 1.4, 1.4) game.Debris:AddItem(Rock,20) wait(0.2) -- Time to wait in between clicks debounce = false end |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2015 09:40 PM |
Alright, your edit still didn't work, I added more edits, yet I still get the same outcome, it just spawns more unions.
debounce = false script.Parent.Button.ClickDetector.MouseClick:connect(function() if debounce == false then debounce = true script.Parent.Button.BrickColor=BrickColor.new("Bright red") local Bagel = Instance.new("UnionOperation",workspace) local cash = Instance.new("IntValue",part) if Bagel:IsA("UnionOperation") then cash.Name = "Cash" Bagel.BrickColor=script.Parent.Parent.Parent.DropColor.Value cash.Value = 1 Bagel.CFrame = script.Parent.Drop.CFrame Bagel.Size=Vector3.new(1,1,1) game.Debris:AddItem(Bagel,20) wait(0.2) -- Time to wait in between clicks debounce = false script.Parent.Button.BrickColor=BrickColor.new("Bright green") end end end)
|
|
|
| Report Abuse |
|
|
|
| 20 Oct 2015 09:41 PM |
I changed the name to bagel I changed the rock. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
HRnSN
|
  |
| Joined: 22 Jun 2009 |
| Total Posts: 1276 |
|
|
| 21 Oct 2015 07:38 PM |
| I don't think you can instance a UnionOperation, you have to make it a Part. |
|
|
| Report Abuse |
|
|