There are no errors shown and i don't have any idea how to fix this script. Everything is where should it be, so it's not because of the objects.
local RepStorage = game:GetService("ReplicatedStorage") local Remote = RepStorage:WaitForChild("Remote") local LocalRemote = Remote:WaitForChild("GunSeller") LocalRemote.OnServerEvent:connect(function(player, gunvalue, price) local gun = RepStorage.Data_Stores.SavedGuns:FindFirstChild(player.Name):WaitForChild(gunvalue).Value local givemoney = RepStorage.Data_Stores.Currency:FindFirstChild(player.Name):WaitForChild("Money").Value gun = gun - 1 -- Doesn't Change givemoney = givemoney + price -- Doesn't Change end)
This maybe the correct answer, not sure.
when making Locals, don't use .Value, .Name, etc.. Remove the .Value in line 8 after :WaitForChild("Money") and then add it to line 11 which should be givemoney.Value = givemoney.Value + price, the same thing with gun.