Hello, I would like to change the face of my character through a module when a key is pressed but I can’t. Do you have any idea how to do it?
You can like a keybind or button, then when it’s pressed, change the face’s ASSET ID then restarting the character with it or something along the lines if that, I’m not on my pc right now so I can’t help scripting it, but all you can get the players face then change it through a scripting using a ID in the script or stored in String/NumberValue.
Have a good day!
If you’re changing something with the event connecting it being tied to a player’s interactions, you’ll probably need a LocalScript.
This means a ModuleScript is practically useless, unless what you’re wanting is for only that player to see the change. (or “module” means something completely different, in which case, tell me)
In order to actually change the face though, it’s a decal, meaning you can just swap its content link with another.
module scripts can be required via the client btw
The whole upper portion of my response was about that.
I use a localscript to call the script where my module is stored
Via a RemoteEvent I assume.
In that case, ignore what I said earlier except for the tiny bit at the bottom.
What does the module do?
Does it store IDS or something
the module is used to bring effects for an attack.
what do you mean by ids?
How would an attack module reflect to face?
What I meant by ids is the Face ids.
Also is the module about, “your attack mode = your face” or something?
Does The module refer from the attack effects to face ids?
in the module there are currently 2 functions, one for the effects with the sword and the second for the face change.
I wish that at the moment when my attack is launched the face changes.
When the sword is hit is there an animation or a rotation?
If yeah, you can trigger the face change when the property has changed value!
there is an animation that starts
Does the sword change its rotational value when hit though or anything like that?
when the animation starts the player turns his sword yes the rotation changes through the animation
Then you could use something like
if Item:GetPropertyChangedSignal("Rotation").Value then -- code here -- I suggest triggering the face change here end
Sorry if this is wrong, I can’t use syntax as I’m not pc!
This also might error as I have not tested it.
no problem i’ll try it i’ll put it in the module we agree?
Sure, you could try that or use another script, if you do, be sure to make it a local function and require it.