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

weird stuff that doesnt work?

Asked by 5 years ago
Edited 5 years ago
    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

0
Userdata objects are instances The_Pr0fessor 595 — 5y
0
why did u change the entire question The_Pr0fessor 595 — 5y
0
with no explanation as why it wont worl The_Pr0fessor 595 — 5y
0
coz i found a way to work around it Fractured8530 0 — 5y
View all comments (7 more)
0
what did the output say The_Pr0fessor 595 — 5y
0
nothing Fractured8530 0 — 5y
0
nothing except for fired event thing but it doesnt print ok Fractured8530 0 — 5y
0
talk to me on disc if uhave one The_Pr0fessor 595 — 5y
0
Lucki Eck$ #5789 The_Pr0fessor 595 — 5y
0
couldnt add you maybe you add me Fractured#8530 Fractured8530 0 — 5y
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. NLferdiNL 21 — 5y

Answer this question