Furadious
|
  |
| Joined: 23 Dec 2013 |
| Total Posts: 601 |
|
|
| 16 Sep 2017 10:09 AM |
I've recreated a kill tool using the console, once I run the code, It sets a tool with the kill script inside it, once I target a humanoid it should kill it. It doesn't work like the kill tool from the models. (Yes I've literally perfectly copied it into a run-able console script)
Maybe It has to do with the console somehow not loading it properly, which is why I tried wait(2) in-between the instances but this just ran it all instantly which seemed a bit odd.
How do I solve this? The script resides inside the Tool but it simply doesn't do what it's meant to??? I am very confused.
Instance.new("HopperBin", game.Players.Furadious.Backpack)
Instance.new("LocalScript", game.Players.Furadious.Backpack.HopperBin)
game.Players.Furadious.Backpack.HopperBin.LocalScript.Source = [[
--I have my own version of this but I was just trying to replicate it exactly as it were from the model and this still doesn't work??????
--Do not edit anything without an edit tag. enabled = true hopper = script.Parent
function cursor(mouse) if enabled then mouse.Icon = "rbxasset://textures\\GunCursor.png" else mouse.Icon = "rbxasset://textures\\GunWaitCursor.png" end end
function killtrgted(mouse) if enabled then enabled = false cursor(mouse) trgt = mouse.Target check = trgt.Parent:FindFirstChild("Humanoid") if (check ~= nil) and (check.Health ~= 0) then trgt.Parent:BreakJoints() end wait(2) --Edit here.-- enabled = true end cursor(mouse) end
function slctd(mouse) print("Ruger392 Productions Kill Hopper Selected") cursor(mouse) mouse.Button1Down:connect(function() killtrgted(mouse) end) end
hopper.Selected:connect(slctd)
]]
|
|
|
| Report Abuse |
|
|
Furadious
|
  |
| Joined: 23 Dec 2013 |
| Total Posts: 601 |
|
|
| 16 Sep 2017 10:15 AM |
| Does anyone know as to why it is not running when it should? |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2017 10:17 AM |
| for the hopper you got its parent but did you set it as a child? |
|
|
| Report Abuse |
|
|
Furadious
|
  |
| Joined: 23 Dec 2013 |
| Total Posts: 601 |
|
|
| 16 Sep 2017 10:22 AM |
@DidSomeoneSayWaffles I don't understand what you mean... and that's beside the point.
All of this should work but it doesn't. If I copy and paste the tool into my backpack again, it works... I need it to work on my first run. |
|
|
| Report Abuse |
|
|
Furadious
|
  |
| Joined: 23 Dec 2013 |
| Total Posts: 601 |
|
|
| 16 Sep 2017 10:33 AM |
Bump
It's definitely a console bug. |
|
|
| Report Abuse |
|
|
Furadious
|
  |
| Joined: 23 Dec 2013 |
| Total Posts: 601 |
|
|
| 16 Sep 2017 10:44 AM |
Already found a solution! As I suspected... I had to clone the object because console is so buggy.
After my line of code I add:
game.Players.Furadious.Backpack.HopperBin:Clone().Parent = game.Players.Furadious.Backpack
|
|
|
| Report Abuse |
|
|