#It wont save the AFK setting

1 messages · Page 1 of 1 (latest)

frosty slate
#

idk whats wrong here. It works fine in normal roblox studio testing but once i do the server and clients test thing it wont work. The data saving itself does work tho js not the part where its supposed to save the setting. (i did this with a tutorial cuz im still learning and tried to implement the AFK setting saving thing)

#

it doesnt work in normal roblox testing anymore

gloomy panther
gloomy panther
# gloomy panther FireServer("on") FireServer("off"): FireServer(true) FireServer(false)

Replicated.Remotes.AFKHandlerEvent.OnServerEvent:Connect(function(EventPlayer, status)
if player == EventPlayer then
sessionData[player.UserId].Settings.AFK = status
end
end):

Replicated.Remotes.AFKHandlerEvent.OnServerEvent:Connect(function(player, status)
if sessionData[player.UserId] then
sessionData[player.UserId].Settings.AFK = status
end
end)

gloomy panther
gloomy panther
frosty slate
#

Thanks I‘ll try it out, but I got a question doesn‘t
if sessionData[player.UserId] then
just check if theres something in the sessionData table for that user?

sweet thistle
#

helps with overall performance too, since youre not connecting the remoteevent everytime a player joins

frosty slate
#

do i put the coins.Changed function outside too or not?

frosty slate
sweet thistle
#

your previous code is making connection everytime a player joins, and its not getting cleaned up either

#

if 100+ player joined a server, the server is gonna be hell

frosty slate
#

does this work?