|
| 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 |
|
|
|
| 31 Mar 2014 07:45 PM |
check lighting if Test exists
and also this script would break at times
i'm asian |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 31 Mar 2014 07:57 PM |
| Okay. Your no help with my real script, does anyone else want to HELP me? |
|
|
| Report Abuse |
|
|
| |
|