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
 

Re: Does anyone know how to do this?

Previous Thread :: Next Thread 
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
31 Mar 2014 07:44 PM
This error has nothing to do with the leaderboard part!


function onTouched(hit)
player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
l = player.leaderstats.Points
if l.Value >= 5 then
local t = game.Lighting.Test:Clone()
t.Parent = player.Backpack -- Output says T(a nil value) This is the line that errors out.
end
end
end

script.Parent.Touched:connect(onTouched)
Report Abuse
JigglingJack is not online. JigglingJack
Joined: 25 Mar 2014
Total Posts: 11263
31 Mar 2014 07:45 PM
check lighting if Test exists

and also this script would break at times

i'm asian
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
31 Mar 2014 07:48 PM
Here is the full output:
18:35:44.094 - Workspace.Test Model.Head.Script:8: attempt to index local 't' (a nil value)
18:35:44.095 - Script 'Workspace.Test Model.Head.Script', Line 8
18:35:44.095 - stack end
18:35:44.096 - Disconnected event because of exception

Also, test is in game.lightning. Here is the output to this script:
while true do
local clone = game.Lightning:FindFirstChild('Test')
if clone then
print(hi)
end
end

Output: hi
Report Abuse
JigglingJack is not online. JigglingJack
Joined: 25 Mar 2014
Total Posts: 11263
31 Mar 2014 07:49 PM
how does your above script verify anything when it isn't even correctly written

i'm asian
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
31 Mar 2014 07:52 PM
If its incorrectly written give me the correct version! I dont know what to fix if you dont tell me!
Report Abuse
JigglingJack is not online. JigglingJack
Joined: 25 Mar 2014
Total Posts: 11263
31 Mar 2014 07:55 PM
while true do
local clone = game.Lightning:FindFirstChild('Test')
if clone then
print(hi)
end
end

would crash your server, studio whatever

i'm asian
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
31 Mar 2014 07:57 PM
Okay. Your no help with my real script, does anyone else want to HELP me?
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
31 Mar 2014 08:03 PM
Anyone?
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