Scripts will completely stop running after a certain line, no errors nor warnings

Output to show where it stops: (The ones that have timestamps are warnings so I can tell the difference between staring and what is happening)

  Server stack begin
  01:02:13.354 - [serverStart] Starting serverStart at 0
  01:02:13.356 - [serverStart] Declaring services
  [serverStart] ReplicatedStorage
  [serverStart] ServerStorage
  01:02:13.358 - [serverStart] Creating Instances
  [serverStart] globalCharFilterEnabled
  [serverStart] Events
  [serverStart] debugFunctionsAndEvents
  [serverStart] serverStorageFunctionsAndEvents
  [serverStart] serverListUpdateRemoteEvent
  [serverStart] applyDebugAsyncRemoteEvent
  [serverStart] teleportToServerAsyncEvent
  [serverStart] teleportToSelectedServerAsyncEvent
  [serverStart] getPlayerInfoAsyncEvent
  [serverStart] chatAsyncEvent
  [serverStart] teleportToReservedServerAsyncRemoteEvent
  [serverStart] checkIfDebugAsyncRemoteFunction
  [serverStart] getPlayerPermissionLevelAsyncRemoteFunction
  [serverStart] getPlayerModerationLogsAsyncRemoteFunction
  [serverStart] getPingAsyncRemoteFunction
  01:02:13.373 - [serverStart] Naming instances
  [serverStart] serverListUpdateRemoteEvent
  [serverStart] applyDebugAsyncRemoteEvent
  [serverStart] teleportToServerAsyncEvent
  [serverStart] teleportToSelectedServerAsyncEvent
  [serverStart] getPlayerInfoAsyncEvent
  [serverStart] chatAsyncEvent
  [serverStart] teleportToReservedServerAsyncRemoteEvent
  [serverStart] checkIfDebugAsyncRemoteFunction
  [serverStart] getPlayerPermissionLevelAsyncRemoteFunction
  [serverStart] getPlayerModerationLogsAsyncRemoteFunction
  [serverStart] getPingAsyncRemoteFunction
  01:02:13.385 - [serverStart] End, completed without error in 0.028477430343628s
  01:02:13.387 - [Server] Starting Server at 0
  01:02:13.388 - [serverStart] Declaring Services
  [Server] MessagingService
  [Server] Players
  [Server] RunService
  [Server] ServerScriptService
  01:02:13.393 - [Server] Declaring Storage
  [Server] ReplicatedStorage
  [Server] ServerStorage
  01:02:13.396 - [Server] Getting module folders
  [Server] Modules
  01:02:13.397 - [Server] Getting modules
  [Server] FeatureFlagService
  01:02:13.400 - [FeatureFlagService] Starting FeatureFlagService at 0
  01:02:13.401 - [FeatureFlagService] Declaring Services
  [FeatureFlagService] DataStoreService
  01:02:13.403 - [FeatureFlagService] Getting DataStores
  [FeatureFlagService] featureFlagDataStore
  01:02:13.405 - [FeatureFlagService] Running modules
  [FeatureFlagService] FeatureFlagServiceClient
  Server Stack End

  Client stack begin
  01:02:18.215 - [Framework] Starting framework at 0
  01:02:18.216 - [Framework] Declaring services
  [Framework] Players
  [Framework] TweenService
  [Framework] StarterGui
  01:02:18.218 - [Framework] Cleaning up unnecessary CoreGui elements
  [Framework] PlayerList
  [Framework] Backpack
  [Framework] EmotesMenu
  01:02:18.220 - [Framework] Declaring storage
  [Framework] ReplicatedStorage
  01:02:18.221 - [Framework] Beginning player definition
  [Framework] LocalPlayer
  [Framework] PlayerGui
  [Framework] PlayerScripts
  01:02:18.224 - [Framework] Gettings ScreenGuis
  [Framework] PC
  01:02:18.225 - [LoadingGui] Starting LoadingGui at 0
  01:02:23.370 - [Framework] Getting module folders
  [Framework] LocalPlayerModules
  [Framework] Modules
  [Framework] coreGuiModules
  01:02:23.375 - [Framework] Gettings coreGuiModules
  [Framework] DebugModule
  [Framework] coreModule
  01:02:23.391 - [playerPermissionsRequestModule] Declaring storage
  [playerPermissionsRequestModule] ReplicatedStorage
  01:02:28.333 - [Framework] Getting LocalPlayerModules
  [Framework] CameraModule
  [Framework] playerPermissionsRequestModule
  [Framework] playerModerationLogsRequestModule
  01:02:34.367 - [Framework] Continueing rest of Runtime
  01:02:34.368 - [playerPermissionsRequestModule] getting PlayerPermissionLevel
  Client stack end

Frame work stops here

playerPermissionsLevelRequestModule stops here:

Server stops here:

FeatureFlagService stops here:

FeatureFlagServiceClient code:
Screenshot:


Codeblock:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local FeatureFlagService = require(script.Parent)

return function()
	ReplicatedStorage:WaitForChild("getFeatureFlag").OnServerInvoke = function(fromPlayer, Method, Key, ValueToSet)
		if fromPlayer:GetRankInGroup(3532517) < 50 and Method:lower() == "post" then
			return fromPlayer:Kick("Using fastvalues, lol, go apply for developer kid.")
		else
			if Method:lower() == "get" then
				return FeatureFlagService.getFeatureFlag(Key)
			elseif Method:lower() == "post" then
				if type(ValueToSet) ~= "boolean" then
					return error("Type set is not valid")
				else
					return FeatureFlagService.defineFeatureFlag(Key, ValueToSet)
				end
			else
				return error("Method is not valid!")
			end
		end
	end
end

Script that create getFeatureFlag:
Screenshot


Codeblock:


--	// FileName: __f_customservice_setup_runner.server.lua
--	// Version: 1.0
--	// Written By: Aleksej Grasnich
--	// Description: Sets up all file dependencies
--	// TODO:
--			

local ServerScriptService = game:GetService("ServerScriptService")

local ReplicatedStorage = game:GetService("ReplicatedStorage")

if script.Parent ~= ServerScriptService then
    script.Parent = ServerScriptService
end


local getFeatureFlag = Instance.new("RemoteFunction", ReplicatedStorage)
getFeatureFlag.Name = "getFeatureFlag"


script:Destroy()

Hierarchy:
Server when not playtesting:
image
Server when playtesting:
image

ReplcatedStorage when play testing:
(GlobalChatFilter when disabled will only uncensored words on that client)
image

Client when not playtestin:
image
Client when playtesting:
image

IF YOU CANNOT READ, I CLEARLY STATE THERE IS NO ERRORS NOR WARNINGS THAT DON’T COME FROM ME IN THE TITLE

Anything else I need to supply, please tell me.

3 Likes

I didn’t spend too much time looking at this but it looks like you have cyclic requiring.

FeatureFlagService requires FeatureFlagServiceClient
and FeatureFlagServiceClient requires FeatureFlagService

and repeat and repeat and repeat …

1 Like

I swear sometimes my own stupidity can overtake my actions, this just made me realise why the server crashed… fixed it by requiring the client module on the Server.server.lua file instead of the Child’s parent