Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

attempt to index a nil value?

Asked by 4 years ago
Edited 4 years ago

Hello, I'm Making a JoJo game and I stumbled upon an error: 14:55:27.481 - Players.MajinBluee.Backpack.None:711: attempt to index a nil value. I don't really have much to say.

Script (LocalScript):

InputService.InputBegan:connect(function(input)
    if workspace.timestopped.Value == false or workspace.timestopper.Value == Player.Name then
        if input.UserInputType == Enum.UserInputType.MouseButton1 and not intextbox and PlayerGui:WaitForChild("statUI"):FindFirstChild("background").Position ~= UDim2.new(0.7,0,0.06,0) then
--....

The Problem is in line 3.

Help Would Be Really Appreciated

2 answers

Log in to vote
0
Answered by 4 years ago

hmm, that whole script is dead now LMAO FE

0
? MajinBluee 80 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

I'm assuming the issue is coming from the intextbox variable it's checking. If so, remove that part and simply post this right beneath the input check.

local TBF = game:GetService("UserInputService"):GetFocusedTextBox()
if TBF then return end

Not 100% sure if that's where the error is coming in at but that's my rough guess. Hope this helps.

0
Nope. Doesn't Work. MajinBluee 80 — 4y
0
I think I fixed it, Thanks for the help! MajinBluee 80 — 4y
0
Np. Glad you managed to work it out. XxTrueDemonxX 362 — 4y

Answer this question