Ok, so basically I am making a GUI that will distribute a value called "Insignia" I will provide you pictures on where everything is to make your life and my life easier. Link1Link2 and finally, Link3
So the error I get is: 19:11:22.526 - Players.Player.PlayerGui.AdminGui.Background.Distribute.Script:6: attempt to index global 'plyr' (a nil value) 19:11:22.527 - Stack Begin 19:11:22.528 - Script 'Players.Player.PlayerGui.AdminGui.Background.Distribute.Script', Line 6 19:11:22.529 - Stack End
And the script is:
pname = script.Parent.Parent.Player.Text
plyr = game.Players:findFirstChild(""..pname)
script.Parent.Parent.Distribute.MouseButton1Click:connect(function()
if script.Parent.Parent.Parent.InsigniaValue.Value > 0 then
plyr.Data.InSig.Value = plyr.Data.InSig.Value + script.Parent.Parent.Parent.InsigniaValue.Value
if script.Parent.Parent.Parent.InsigniaValue.Value < 0 then
plyr.Data.InSig.Value = plyr.Data.InSig.Value - script.Parent.Parent.Parent.InsigniaValue.Value
end
end
end)
If you could help me, that would be amazing.

1 comment
That did not work for me, it still gives me an error. Thank you for posting though.