new script
local Module = require(script.Parent:WaitForChild("ServerAdmin"):WaitForChild("ModuleScript"))
game.Players.PlayerAdded:Connect(function(player)
print("player joined")
local Warning = Instance.new("IntValue")
Warning.Name = "Warnings"
--Warning.Value = Module.LoadWarnings(player)
Warning.Parent = player
print("Parented")
end)
game.Players.PlayerRemoving:Connect(function(player)
Module.SaveWarnings(player)
end)
nothing in output
instead of game.Players
, use game:GetService("Players")
1 Like
Itâs likely that you are infinitely waiting for ServerAdmin or ModuleScript
2 Likes
There would be an infinite yield warning, if that was the case.
2 Likes
SOTR654
(SOTR654)
#25
I donât think, if you stop the test immediately, most errors will not come out.
1 Like
nothing in output
Thanks for everyone who tried to help
SOTR654
(SOTR654)
#27
Put a print() below the require(), if the wait is really infinite, it wonât print.
1 Like
Ya It doesnât print anything in the output
SOTR654
(SOTR654)
#29
You should move the module to ServerStorage because as the name says, it is for scripts only.
1 Like
I moved the module scripts
And I found the problem
without requiring the module:
with requiring:
SOTR654
(SOTR654)
#31
It is because of the infinite wait, if you want to confirm it, inside the require(), but in the end, put a comma and 1, the value will have nil.
local Module = require(script.Parent:WaitForChild("ServerAdmin"):WaitForChild("ModuleScript"),1)
Leave the folder in ServerStorage.
local ServerStorage = game:GetService("ServerStorage")
local Module = require(ServerStorage:WaitForChild("ServerAdmin"):WaitForChild("ModuleScript"))
1 Like
Fast_Duck
(Fast_Duck)
#32