Alright, so I have a brick that has a Script in it and what I need this script to do is change a Players Money Gui but ONLY when the Player is touching the Brick. So far it has not gone right. I am not sure whats wrong but it is just not working. Also there is an error on one of the End's. Here it is:
local money = game.Workspace.player.PlayerGui.MoneyGui
local paybrick = script.Parent
function payperson(player)
repeat
if player.PlayerGui.Job.Jobname.Text == "Cashier" then
MoneyGui.Value = 0 + 10
wait(7)
else
end
until(player.touched == false)
end
end --this line says '<eof>' expected near 'end' and I have no idea what an <eof> is.
script.Parent.touched:connect(payperson)
So it should not be that hard of a Script but I can not figure it out. Also in the MoneyGui is another script that should keep the players money so as the player makes money the Gui shows that without the player having to reset, not sure if it would help but here is that script:
local money = script.Parent
local playermoney = script.Parent.Value
while true do
player.PlayerGui.money.Text = playermoney.Value .. '$'
wait(0.1)
end
No errors with this one as far as I know. I really need some help as to why the first script wont work though. I have no idea what an is and I am just clueless as to what is wrong. I am not very "Advanced" I know the bare bone basics and I am trying to push what I know with this game.

2 comments
You helped by explaining the part but the code still does not work.
Well, for the money variable, you haven't identified player and you need to use Players instead of Workspace. I've edited the script, see if it works.