Good Day, I’m making it so when you click the button, the cash value (which is located in a folder, called stats inside the Local Player) is increased by 1. I just can’t seem to get my head around what’s the problem, and I’m so tired. Help would be appreciated.
My Local Script
--//Variables\\--
local plr = game:GetService('Players').LocalPlayer
local Button = script.Parent
local moneygui = plr.PlayerGui.MoneyGui.Frame
local Event = game:GetService('ReplicatedStorage').RemoteEvent
local cashvalue = plr.Stats.Cash
Button.MouseClick:Connect(function()
Event:FireServer()
end)
My Server Script
game:GetService('ReplicatedStorage'):FindFirstChild('RemoteEvent').OnServerEvent:Connect(function(player)
local cashvalue = player.Stats.Cash
cashvalue.Value = cashvalue.Value + 1
end)
My Button
Can’t figure out what I’m missing. Maybe it’s my brain on lack of oxygen? Any help is greatly appreciated!