hey all, i’ve been programming NPC managers for an upcoming Baldi-inspired game. the game uses its own framework, and does NOT rely on ANY free models, everything is written in-house by the group making the game.
i have tested some functionality for 1st Prize (a baldi’s basics character) and also a generic dialogue manager. however, very recently i have been receiving errors after requiring the modulescript from a serverscript, specifically a capability error reading:
i can reduce the amount of code to barely anything inside the modulescript but the error still prevails. i have also rearranged the entire structure of the framework inside ReplicatedStorage numerous times, and yet the same thing happens.
the code for the serverscript requiring the faulty modulescript:
local replicatedStorage = game:GetService("ReplicatedStorage")
local framework = replicatedStorage:WaitForChild("BMP_Framework")
local npcs = framework:WaitForChild("NonPlayerCharacters")
local character = require(replicatedStorage.BMP_Framework.NonPlayerCharacters.FirstPrize)
local dialogueManager = require(replicatedStorage.BMP_Framework.Interactions.DialogueManager)
local model = script.Parent
dialogueManager.Speak(model, character.Lines.FPR_Motor, character.Primary)
the modulescript in question:
local character = {}
-- sprite is handled by the client
-- 2.5d sprites mean it has to be client-sided
-- otherwise the server would clash with multiple clients
-- and that's bad :(
character.Primary = Color3.fromRGB(0, 223, 255)
character.Lines = {
FPR_Motor = {
id = "rbxassetid://77457620493782",
transcript = "*Motor running*"
}
}
return character
as displayed here, not much is going on in either of these scripts: which is why i’m so confused as to the root of the error.
i even tried referring to ChatGPT very briefly to see if it could help, but everything i tried (including changing SandboxedInstanceMode in workspace) still resulted in the same error. any help would be appreciated! many thanks in advance!
