how can i fix this within my module
local module = {}
local MainModule = require(game.ServerScriptService.MainModule)
module.Race = function(Player)
local Stats = game.ServerStorage.PlayerData:FindFirstChild(Player.Name):WaitForChild('Stats')
how can i fix this within my module
local module = {}
local MainModule = require(game.ServerScriptService.MainModule)
module.Race = function(Player)
local Stats = game.ServerStorage.PlayerData:FindFirstChild(Player.Name):WaitForChild('Stats')
How do you get Player? show the code.
i fixed that part just now
now i gotta fix the waitforchild
local Players = game:GetService("Players")
local MainModule = require(game.ServerScriptService.MainModule)
local module = {}
module.Race = function()
local Stats = game.ServerStorage.PlayerData:FindFirstChild(Players.Name):WaitForChild('Stats')
Sounds like you’re trying to take a player’s data, right? Well, since you don’t do it, because you are searching with Players
, it will give infinite wait.
it does take player data this not the only script
how would i search it instead?