I wanted to make a script for an admin panel that, when you press +100 it adds 100 credits to the targeted player's credits intValue, but i get the output Attempt to call a nil value?
local currentTarget = script.Parent.Text
local player = game.Players.LocalPlayer
script.Parent.Parent.okButton.MouseButton1Click:Connect(function()
script.Parent.Parent.playerNameCn.Text = currentTarget
script.Parent.Parent.playerTarget.Visible = false
script.Parent.Parent.playerNameCn.Visible = true
script.Parent.Parent.p100.MouseButton1Click:Connect()
game.Players[currentTarget].leaderstats.Credits.Value = game.Players[currentTarget].leaderstats.Credits.Value + 100
end)
script.Parent.Parent.back.MouseButton1Click:Connect(function()
script.Parent.Parent.playerNameCn.Text = "nameHolder"
script.Parent.Parent.playerNameCn.Visible = false
script.Parent.Parent.playerTarget.Visible = true
end)

3 comments
Still the same output, and i said that there is no output error, just attempt to call a nil value.
Its an error.
Check if you have defined all instances right.