|
| 06 May 2017 12:35 AM |
so the script works but i want a wait() in it as when i put a wait it takes the time i put to spawn it what i want it to do is have a reload time so you cant spam. but i dont want it to affect the time it take to spawn just a reload between use.
-------------------------------------------------------------------------- bin = script.Parent
function onButton1Down(mouse)
local model = bin.Figure:clone()
model.Parent = game.Workspace model:MakeJoints() model:MoveTo(mouse.hit.p)
end
function onSelected(mouse) mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end
bin.Selected:connect(onSelected) |
|
|
| Report Abuse |
|
|
|
| 06 May 2017 12:37 AM |
| its also using a Hopper bin tool so i dont know if that makes a difference but i do know that hoppers have been removed |
|
|
| Report Abuse |
|
|
Salinas23
|
  |
| Joined: 28 Dec 2008 |
| Total Posts: 37141 |
|
|
| 06 May 2017 12:42 AM |
local bin = script.Parent local enabled = true
function onButton1Down(mouse)
if enabled then enabled = false
local model = bin.Figure:clone()
model.Parent = game.Workspace model:MakeJoints() model:MoveTo(mouse.hit.p)
end
function onSelected(mouse) mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end)
wait(1) -- reload time enabled = true end end
bin.Selected:connect(onSelected)
I have a spider on my back. |
|
|
| Report Abuse |
|
|
|
| 07 May 2017 07:14 PM |
it says attempt to call a nil value (x8)
|
|
|
| Report Abuse |
|
|