Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isnt myy statpoint system working?

Asked by
tacotown2 119
5 years ago
Edited 5 years ago
--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)
0
You trust the client too much Optikk 499 — 5y

Answer this question