So i have a button and when you click it it changes a value to something else. When i rejoin the game the value is the same as it was before but if i change the value through developer console it does save. Please help!
here is the server script inside the button:
local Player = script.Parent.Parent.Parent.Parent.Parent.Parent
local LS = Player:FindFirstChild("leaderstats")
local Button = script.Parent
local Image = script.Parent.Parent
local CharVal = Player:WaitForChild("CharacterValues"):WaitForChild("Jessica")
Button.MouseButton1Click:Connect(function()
if CharVal.Value == 1 then
script.Parent.Equip.Disabled = false
LS.Character.Value = "Jessica"
Button.Text = "Equipped"
wait(3)
script.Parent.Equip.Disabled = true
elseif CharVal.Value == 0 then
script.Parent.Purchase.Disabled = false
CharVal.Value = 1
LS.Character.Value = "Jessica"
Button.Text = "Equipped"
LS.Bucks.Value = LS.Bucks.Value - 300
wait(3)
script.Parent.Purchase.Disabled = true
end
end)

2 comments
do i give the currency through the server or local script when using remote event?
The server.