#Issue with UserID variable.

1 messages · Page 1 of 1 (latest)

worthy sluice
#

Okay need help with this so, I have a script and a module script linked to the discord bot I made

This script is in server script service

local module = require(game:GetService("ServerScriptService").Whitelist)
local players = game:GetService("Players")
local event = game:GetService("ReplicatedStorage").LinkHandler

game.Players.PlayerAdded:Connect(function(player)
local userid = player.UserId
print(module.GetVerifyStatus(tonumber(userid)))
local code = module.GetLinkCode(tonumber(userid))
print(code)
event:FireClient(player, code)
end)

My issue is when i call the gelinkcode it is supposed to respond with a random code as long as the userid is real and subsiquently i also have the getverifystatus which will respond with link or complete. However it just responds with nil for both.
as you can see sometimes it works sometimes it doesnt

#

as you can see sometimes it will do it correctly

#

sometimes it will leave nil

light cloak
#

does the module script return the functions properly

#

also are you relying on a database or web request in the module

worthy sluice
#

from this

#

bot side its working fine as it is generating a code

#

its just the roblox side

#

and in this case it is finding link just not value