#How to search through module with a loop
37 messages · Page 1 of 1 (latest)
Handle it serverside, then replicate it to client
this is the error for it, I don't think handling it serverside and replicating it to client would help. Or did I missunderstood what you meant
Before the error, it is important to keep important stuff like that, serverside
okay will try that
I used
wait
local rs = game:GetService("ReplicatedStorage")
local folder = rs:WaitForChild("Modules")
local module = require(folder.Stats)
I'm trying to pass everything through remote event into server script where I execute the loop and then pass it through another remote event to client, but it does nothing
for k,v in state.Stats1 do
end
?
looks right
will try, sorry I was away
its alr
@jovial knot wdym by the "state"
Mb stat
oh okay
Module Script
Local Script
(The module is named PestsStats I renamed it)
replace stats with your module name
okay and if I were to add like 25 more how would I do it so it finds the right one and gets those stats, that was what I was aiming for
if k == "stat name"
I meant like if I were to add Stats2, Stats3 and search for their Attack, Speed, HP etc. how would I replace the module.Stats1 with module.Stats2 with a script
Replace stats1 by stats2 etc
okay thanks so much for help :)
Or do two loops
wdym
for k,v in stats
for i,j in v do
if I == "stat name" then
end
end
End