For some reason, I've been getting this error message that requires me to kill my script when I'm testing out my game. Here are the scripts:
local button = script.Parent.TextButton
local frame = script.Parent.Frame
local function findValue()
local moneyCount = game.Players.LocalPlayer.MoneyCount
end
local function addMoney()
moneyCount.Value = moneyCount.Value + 1
end
game.Players.PlayerAdded:Connect(findValue)
button.MouseButton1Click:Connect(addMoney)
local frame = script.Parent.Frame
local button = script.Parent.TextButton
function getMoney()
frame:TweenPosition(UDim2.new(0.5,-100,0.5,-25),'Out','Quint',.5)
wait(.75)
frame:TweenPosition(UDim2.new(0.5,-100,10,-25),'In','Quint',.5)
end
button.MouseButton1Click:Connect(getMoney)
local gui = script.Parent
local display = gui.MoneyAmount
local money = game.Players.LocalPlayer.MoneyCount
while true do
display.Text = money.Value
end
These are both local scripts. I have no idea what this error message means. Help would be appreciated!
EDIT: Another local script. This may be the problem.

2 comments
I'll add an edit with another localscript
Thank you very much! That really helped me!