local Re = game:GetService("ReplicatedStorage")

local Plrs = Re.Players

local Remotes = Re:WaitForChild("Remotes")

Remotes.Events["Add stats"].onServerEvent:connect(function(plr, args)

local stuff = Plrs[plr.Name].Stuff

print("Fired event, args are " .. args)

if stuff.Points.Value > 0 then
print"ok"

if args == "STR" then

stuff.Points.Value = stuff.Points.Value - 1

stuff.STR.Value = stuff.STR.Value + 1

elseif args == "WIS" then

stuff.Points.Value = stuff.Points.Value - 1

stuff.WIS.Value = stuff.WIS.Value + 1

elseif args == "DEF" then

stuff.Points.Value = stuff.Points.Value - 1

stuff.DEF.Value = stuff.DEF.Value + 1

end

end

end)

how about this? it doesnt print ok even tho my points are over 1

11 comments

0

Userdata objects are instances

0

why did u change the entire question

0

with no explanation as why it wont worl

0

coz i found a way to work around it

0

what did the output say

0

nothing

0

nothing except for fired event thing but it doesnt print ok

0

talk to me on disc if uhave one

0

Lucki Eck$ #5789

0

couldnt add you maybe you add me Fractured#8530

0

I suggest you give your variables better names. It is very difficult to read and understand this code. I would not be able to know what stuff and Re is if I didn't look at where they are made.