I have This Script Where we are trying to Edit the Stats Through a Panel. What the Script is Meant todo is you Put in a Amount then you put in the players Name But We are Getting a Error saying (Index nil) We are Trying to Defined the Player But Nothing Is Happening.
local Amount = script.Parent.Parent.Amount.Text
local player = game:GetService("Players").LocalPlayer
script.Parent.MouseButton1Click:connect(function(player: Player)
if Amount == nil then
script.Parent.Parent.Info.Text = "No Value has Been Entered..."
wait(4)
script.Parent.Parent.Info.Text = "Enter In the amount"
else
Amount = script.Parent.Parent.Amount.MoneyAMT.Value
script.Parent.Text = player.Name
script.Parent.Parent.Parent.ChangeMoney:FireServer(Amount)
end
end)
If you have any Suggestions How to Fix This issue Please let Me know!
local Amount = script.Parent.Parent.Amount.Text
local player = game:GetService("Players").LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
if Amount == nil then
script.Parent.Parent.Info.Text = "No Value has Been Entered..."
wait(4)
script.Parent.Parent.Info.Text = "Enter In the amount"
else
Amount = script.Parent.Parent.Amount.MoneyAMT.Value
script.Parent.Text = player.Name
script.Parent.Parent.Parent.ChangeMoney:FireServer(Amount)
end
end)