#need help sorting out a character selection bug with anims
1 messages · Page 1 of 1 (latest)
I also tried just putting it into the rigs animate and it didnt work
this is like
the last step in my game too so once i work this out it'll be fire
if it were me i would store the animations in a module script
and use the name of whatever the character is called to access the animations
get the animations from the module using a remote function from a localscript and gg ez
thing is every character has to be named "StarterCharacter" for it to work
** You are now Level 4! **
oh is there only one character?
until i work out the problems with the animations yeah
i can TRY and change them but last time i checked it doesnt work
so how do you differentiate one character from another
why does one have Animation1 while another has Animation2?
do you select from a gui
oh ok nevermind im an idiot it works
oh lol nice
i could change their names
im really not good at scripting so im just kind of
entirely forcing things to work
we getting better everyday 🙏
trust
like
i couldnt figure out how motor 6D and rigs worked
so i made my own rig in blender
and that ended up working
😭 took it into your own hands
blender is easy as shit i found out too
but anyways how would i go around making a module
ive never messed with them before
you'd have to spoonfeed me it 💔
hmmm how would i explain
lemme find an example
so module scripts are used to be able to reuse code like functions tables etc
-- ServerScriptService / ModuleScript
local CharacterStats = {
Starter = {
Health = 100,
Damage = 10,
WalkSpeed = 16,
},
Mage = {
Health = 80,
Damage = 25,
WalkSpeed = 14,
},
Orc = {
Health = 150,
Damage = 20,
WalkSpeed = 12,
}
}
return CharacterStats
imagine you wanted to save your characters a player could be digitally
and add some properties
you can do something like this, even saving clothing IDS body colours whatever you want
then make it so they can choose with a gui or just randomly assign them one
if you ever want to buff the orcs, just make their damage 30
its great for if you want to update a game cause making changes is quite easy
i th ink i drooled a little
Theres alot to them, so youd need to deep dive but i hope it helps just a bit
ill try and understand it
its really helpful to learn so give it a shot
so let me try and get this straight
a module would like
let me be able to use a different script inside of it
without having to type it all out again?
or am i an idiot
basically yes
you create functions inside of the module script
so lets say im using a database
i can make a function in the module dedicated to grabbing a players data all i need to do is pass the (player) paramter
GetData(player)
then i can have a function just for updating the players coins
so you can create this organisation in one module
this is the explanation from roblox themself
itll be better than i can whip up
woah dont whip me
😨
ohh
ok i kind of get it
so you can put another script in a module
and use local MyFunctions = require(script.Parent.MyFunctions) to pull them into the script
thats you're currently doing
ok i get it now
n ono
you dont exactly put a script into a module
you can reference a module function from another script
MyFunctions = require(script.Parent.MyFunctions) exactly this
Module scripts go in serverscriptservice
You hold sensitive data in them so putting it on the client is very unideal
** You are now Level 11! **