I am making a game, and I have a script that carries out the function. It's supposed to take away 100$ from you cash from the leaderstats and place the object into the workspace, and remove the plot and the buy screen. Instead nothing happens
script.Parent.MouseButton1Click:connect(function()
if game.Players.LocalPlayer.leaderstats.Cash.Value >= 100 then
game.Players.LocalPlayer.leaderstats.Cash.Value = game.Players.LocalPlayer.leaderstats.Cash.Value - 100
game.Lighting.TacoCart.Parent = game.Workspace
game.Workspace.Plot1:Destroy()
game.Workspace.BuySceen:Destroy()game.Players.LocalPlayer.leaderstats.Cash.Value-[p
end
end)

5 comments
This is also in a local script.
If filtering is enabled then any changes made by the client will not replicate.
filtering enabled is not checked.
It is best to only change the leadrstats on the server where it is safe also I would recommend that you use FE.
When FIltering Enabled is both Enabled and Disabled nothing happens