Hello. I am currently making a shop for a game that is currently in development, but for some reason the remote event is not firing that removes the players money on the leaderstats is not working.
Local script:
script.Parent.MouseButton1Click:Connect(function()
local plr = game.Players.LocalPlayer
local ls = plr:WaitForChild("leaderstats")
if ls.Money.Value >= 25 then
local clone = game.ReplicatedStorage.ShopItems:FindFirstChild("Sturdy Scythe"):Clone()
clone.Parent = plr.Backpack
game.ReplicatedStorage.ShopEvents.Sturdy:FireServer()
end
end)
Server Script:
script.Parent.OnServerEvent:Connect(function(plr)
plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + 1
end)
I have placed prints in certain parts of the script, it just stops at the server script.
There is no errors in the output, the answer could be obvious and iām not seeing it. If you notice anything is wrong, please let me know!
