--local script
local remote = game.ReplicatedStorage.Remotes.DmgM
local plr = game.Players.LocalPlayer
local gui = script.Parent
gui.MouseButton1Click:Connect(function()
remote:FireServer()
end)
--server script
local remote = game.ReplicatedStorage.Remotes.DmgM
remote.OnServerEvent:Connect(function(plr)
if plr.leaderstats.StatPoints.Value >= 1 or plr.leaderstats.StatPoints.Value == 1 then
game.ReplicatedStorage.Dmg.Value = game.ReplicatedStorage.Dmg.Value + 5
plr.leaderstats.StatPoints.Value = plr.leaderstats.StatPoints.Value - 1
game.ReplicatedStorage.PlusDmg.Value = game.ReplicatedStorage.PlusDmg.Value + 5
end
end)
COMMUNITY QUESTION
Why isnt myy statpoint system working?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
You trust the client too much