I am making job for my game it is pizza delivery and i am making script to give money and score to player but when i try to change value nothing happend no errors or something it even print started so i want ask if somebody dont know what to do :c
workspace.Locations.GiveMoney.OnServerEvent:Connect(function()
lplayer = script.Parent.Parent
money = script.Parent.Parent.leaderstats.Money
delivery = script.Parent.Parent.leaderstats.Deliveris
okpizzajob = lplayer.Jobs.OKpizza
if okpizzajob.Value == 1 then
pizzatype = script.Parent.OKpizza.Job.Take.Pizza
delivery.Value = delivery.Value + 1
wait(0.1)
if pizzatype.Value == 1 then
money.Value = money.Value + 10
end
wait(0.1)
if pizzatype.Value == 2 then
money.Value = money.Value + 15
end
wait(0.1)
if pizzatype.Value == 3 then
money.Value = money.Value + 20
end
end
end)

1 comment
cant see an issue othere than that you should use "local" instead of just listing your variables.