generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Recreated script w/ console not working.

Previous Thread :: Next Thread 
Furadious is not online. 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 is not online. 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
DidSomeoneSayWaffles is not online. DidSomeoneSayWaffles
Joined: 16 Mar 2014
Total Posts: 537
16 Sep 2017 10:17 AM
for the hopper you got its parent but did you set it as a child?
Report Abuse
Furadious is not online. 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 is not online. Furadious
Joined: 23 Dec 2013
Total Posts: 601
16 Sep 2017 10:33 AM
Bump

It's definitely a console bug.
Report Abuse
Furadious is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image