Hello everyone! I want to create a melee framework for my weapons; so I don’t need to manually edit each script when I want to change how it functions. However, I’m uncertain how to implement Module Scripts without creating errors, as I am currently unfamiliar with them.
I’ve tried using the ‘require’ function on a local script however, the result was the script being unable to find the assets for materials such as the tool’s parent, being the player. This was how I required it:
-- this script is located inside of the tool
local Framework = require(game.ServerScriptService.MeleeFramework)
Framework({
Player = script:FindFirstAncestorWhichIsA"Player" or game:GetService"Players":GetPlayerFromCharacter(script.Parent.Parent),
Tool = script.Parent,
})
Here’s the output I received:
Getting this problem solved would help benefit development greatly. I can provide more photos of how this script works if necessary, too.