I’m currently creating a SeverScript for a weapon and it automatically is holstered when you walk, but I am not able to use RenderStepped in the ModuleScript, any help?
Edit: The ModuleScript is inside of a ServerScript in ServerScriptService.
I’m currently creating a SeverScript for a weapon and it automatically is holstered when you walk, but I am not able to use RenderStepped in the ModuleScript, any help?
Edit: The ModuleScript is inside of a ServerScript in ServerScriptService.
A modulescript runs where it’s required. Since the Server can’t use RenderStepped a modulescript can only use it when it’s required by a client-side (local) script.
Alright let me try and fix this,
I’ve tried what I though would fix it, but it only made the error worse. I wouldn’t know how to call the Module to the tool since the script is in ServerScriptService, (the script calling the Module is in ServerScriptService), I basically fire an event when the tool is equipped and that binds the script to the tool, I wouldn’t know how to do it otherwise since I’m trying to create my first FE-compatible script.
Use a localscript inside the tool to require the module from, mostly all logic concerning the client should be within localscripts. Use remotes to communicate with the server if the tool needs to request the server to do something.
Alright I will try that.
That worked somewhat, but still this ModuleScript needs to be called by a regular Script which obviously doesn’t work, and I have no idea how to get around that with remotes.
Why does the modulescript need to run on the server? For something like character animations and especially connections to RenderStepped you’ll want to use localscripts. The remotes are for when the server needs to do something not related to the character that replicates to all clients.
For some reason my friend tied in all of the animations with the normal script, and I don’t know how to separate all of it, so I figured it would be easier to somehow keep it like that, I’m not sure at this point what to do.
I’m trying one last thing, if this doesn’t work I don’t know what would.
The last thing I tried didn’t work so I just gave up, thanks for the help though, it was probably correct I’m just not good at scripting, but thank you though.