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 » Scripting Helpers
Home Search
 

[ Content Deleted ]

Previous Thread :: Next Thread 
Cryptonix is not online. Cryptonix
Joined: 03 Jun 2011
Total Posts: 17164
29 Jul 2012 11:01 PM
[ Content Deleted ]
Report Abuse
Cryptonix is not online. Cryptonix
Joined: 03 Jun 2011
Total Posts: 17164
29 Jul 2012 11:04 PM
[ Content Deleted ]
Report Abuse
omzig is not online. omzig
Joined: 18 Jun 2008
Total Posts: 578
29 Jul 2012 11:05 PM
"Random on how many times it will work."

Meaning it gives someone a tool multiple times, or that it only gives one person a tool?
Report Abuse
Cryptonix is not online. Cryptonix
Joined: 03 Jun 2011
Total Posts: 17164
29 Jul 2012 11:09 PM
[ Content Deleted ]
Report Abuse
Cryptonix is not online. Cryptonix
Joined: 03 Jun 2011
Total Posts: 17164
29 Jul 2012 11:21 PM
[ Content Deleted ]
Report Abuse
omzig is not online. omzig
Joined: 18 Jun 2008
Total Posts: 578
29 Jul 2012 11:24 PM
Crypt,

I tend to make functional scripts, and they just work.

When I make a glitchy fix I don't really repair it, I ask SH for that.

I don't know how to *repair* scripts too well. I see the code and it looks functional, but it's a bit glitchy. I cna't repair that.
Report Abuse
Cryptonix is not online. Cryptonix
Joined: 03 Jun 2011
Total Posts: 17164
29 Jul 2012 11:26 PM
[ Content Deleted ]
Report Abuse
omzig is not online. omzig
Joined: 18 Jun 2008
Total Posts: 578
29 Jul 2012 11:30 PM
Could you check output for me, then maybe I could find out what's wrong and help you out?
Report Abuse
Cryptonix is not online. Cryptonix
Joined: 03 Jun 2011
Total Posts: 17164
29 Jul 2012 11:34 PM
[ Content Deleted ]
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
29 Jul 2012 11:39 PM
Eerg, unless you use :WaitForChild() in the clone().Parent Part. Just try this (maybe?):


local debounce = false

function getPlayer(humanoid)
local players = game.Players:children()
for i = 1, #players do
if players[i].Character.Humanoid == humanoid then return players[i] end
end
return nil
end

function onTouch(part)

local human = part.Parent:findFirstChild("Humanoid")
if (human ~= nil) and debounce == false then

debounce = true

local player = getPlayer(human)

if (player == nil) then return end

local tool = script.Parent:clone()
tool.Parent = player.Backpack

wait(.5)
debounce = false
end
end


script.Parent.Parent.Touched:connect(onTouch)
Report Abuse
Cryptonix is not online. Cryptonix
Joined: 03 Jun 2011
Total Posts: 17164
29 Jul 2012 11:42 PM
[ Content Deleted ]
Report Abuse
omzig is not online. omzig
Joined: 18 Jun 2008
Total Posts: 578
29 Jul 2012 11:43 PM
That makes the script run for every player in the game.
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
29 Jul 2012 11:43 PM
Nope, but I like for i, v in pairs() a lot better
Report Abuse
Cryptonix is not online. Cryptonix
Joined: 03 Jun 2011
Total Posts: 17164
29 Jul 2012 11:44 PM
[ Content Deleted ]
Report Abuse
omzig is not online. omzig
Joined: 18 Jun 2008
Total Posts: 578
29 Jul 2012 11:47 PM
Crypt,

Your script isn't *broken*,

It's just glitchy. Something causes it to break when it does, and I don't know what.

If I could find out what that error was, maybe I could fix it.

but there's no way to find out. So you might want to rewrite this a different way, and see if that makes it less glitchy.
Report Abuse
Cryptonix is not online. Cryptonix
Joined: 03 Jun 2011
Total Posts: 17164
29 Jul 2012 11:50 PM
[ Content Deleted ]
Report Abuse
Cryptonix is not online. Cryptonix
Joined: 03 Jun 2011
Total Posts: 17164
29 Jul 2012 11:52 PM
[ Content Deleted ]
Report Abuse
omzig is not online. omzig
Joined: 18 Jun 2008
Total Posts: 578
29 Jul 2012 11:53 PM
Why not anchor all the bricks in the model, and when the new player gets it it unanchors it.

Or even easier:

Put the tool in lighting, and clone it from there...
Report Abuse
Cryptonix is not online. Cryptonix
Joined: 03 Jun 2011
Total Posts: 17164
29 Jul 2012 11:54 PM
[ Content Deleted ]
Report Abuse
omzig is not online. omzig
Joined: 18 Jun 2008
Total Posts: 578
29 Jul 2012 11:56 PM
Ok, glad to of *helped* (Astricks because I did hardly anything figuring it's buggy, not broken).

Tell me when your game is done, and I'll come check it out. :)
Report Abuse
Cryptonix is not online. Cryptonix
Joined: 03 Jun 2011
Total Posts: 17164
30 Jul 2012 12:06 AM
[ Content Deleted ]
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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