Ya, I was aware that some people might have a bone named righthand, that’s why I included boneparent, I assumed that people would not parent the part RightHand to the same place that the bones are parented to
When you say mesh, do you mean a part named RightHand or a mesh named RightHand or the character mesh with all of the bones in it?
Do you animate in blender or roblox, I found that animating in blender is easier but you just have to import the animation, which can be tricky but I suggest using mixamo
I do everything in blender so far. Gives me the freedom to keep all the backups local.
For the example picture above, I named a bone “LeftHand” and a meshpart “LH” and imported it. No distortion. In Blander, I renamed the meshpart “LeftHand” and it broke.
As a second test, I renamed the bone “HandLeft” and repeated the experiment with the meshpart “LeftHand.” Because they were still named different, nothing broke.
So you have your rig as multiple mesh parts and not just a single one with multiple bones under it?
I’m also wondering how you import your animations into roblox, I use a difficult method that I mentioned earlier.
The model, with all its parts, is imported as a single fbx file. The bones follow R15, the mesh parts do not.
It has about 12 parts(?) all separated by material. It’s also modular, so I can replace the armor/hair/body at some future date. All parts are parented to the same armature.
The body is the arms, legs and head, all attached. I didn’t want them wandering off. This is my “S1” build. Everything else is a skinned accessory.
The hand mesh parts are just cubes I positioned in the body for attaching tools. I will probably do the same for the back and belt. They work, as long as they are not named the same as the bones.
As far as exporting my model to fbx, I select all the parts and armature and export “selected only.” In blender, I make sure nothing else can be selected, so it’s a simple matter of selected everything I see.
Ya but what about for animations, in my experience if you have multiple animations for the rig in blender, it will only export the first animation listed, so the only way to export a certain animation is delete all the other ones.
I figured this trick out. Roblox imports the first action alphabetically. So all you need to do is rename the animation you want starting with “aa” then export. None of that deleting is needed. Which is good, because I was terrified of messing that up.
What are you trying to achieve with the tool? Are you trying to make it the same as any roblox tool or are you trying to have an animation that moves the tool around your characters body aka animating the weld(or hinge) between the tool and character
If you are trying to achieve the later then I would suggest creating another bone blender for you rig(name it something like grip)make it parented with keep offset, and go into weight punting and remove everything from that bone. Then animate that bone in blender or roblox as a action priority with only the keyframes for that bone. Put a hinge constraint between the part RightHand and the grip bone. For your animate script use a tool.equipped function to play it(on a loop) and a tool.unequipped function to remove that animation if the only keyframes that you have on the animation are the ones for the grip bone than it will overlay with your other idle and movement animations.
I honestly am not very good at blender but for tool animation you would want to add a constraint to align the tool and your grip bone together(parenting?!?! or a weld-like constraint) then you can rig your tool in blender and actually see how it is the character and tool fit together.
What am I trying to do with the tool? All of the above.
In the left hand, there will always be a source of light, or nothing, depending on whether the player has entered the dungeon.
In the right hand, I want a normal tool. I can code this if I have to, but it sounds like there are changes coming that will make this a lot easier. I’m willing to postpone any efforts here for a while.
What am I trying to do right now? Restore the left hand to full functionality.
Left hand starts empty.
Player touches torch on the ground, torch moves to left hand. Animation changes.
Torch, when clicked, ignites and produces light. When clicked again is extinguished.
I have run across a few problems in doing this.
First, when I run the game, the script parented to the mesh part does not copy over to the player instance, and subsequently, does not create a ClickDetector. Thus the torch cannot be lit with script. This is possibly an old issue. I would not have seen this before, because previously I could just weld the torch to the lefthand after the game is loaded, and everything plays nice. I’m still trying to perfect how to do that with a skinned mesh… and here we are!
The other problem is that some things are (simply put) not skinned meshparts… They have their own rules. Even if I get that script transferred over, the actual location of the ClickDetector will be the original location of the torch. And then there’s this:
To me, it seems like some of the problems you are having are server/client issues. Try seeing what it looks like on the server. Then you may be able to fix the torch particle problem.
For getting the left hand torch to work, I would suggest having it as a model. Then create a part that works as a hitbox(can collide off and transparency 1) that overlaps all of the parts in your model(weld it to the base part of the torch). Then create a clickdetector under your hitbox part. Create a part that works as a handle under your torch model and create a hinge constraint under the handle and set the part 0 to your handle and don’t set the part1 and turn enabled off(the handle should also be welded to your base part of the torch) .Put a normal script under your torch model and use something like
local model = script.parent
local handle = model.handle
local hitbox = model.hitbox
local fire = —wherever your fire is
local equipped = false
local player
hitbox.Touched:connect(function(part)
if part.parent:FindFirstChild(“humanoid”) and equipped== false then
local character = part.parent
model.parent = character
player = game.Players:getplayerfromcharacter(character)
equipped == true
handle.Hinge.Part1 = character.—put pathway to your lefthand bone here
handle.Hinge.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)—tweak this until
—play grip animation here
end
end)
Hitbox.clickdetector.Mouseclick:connect(function(clickplayer)
if player and clickplayer ~= player then—does not continue if the torch is being held and someone who is not holding it clicks it
return
end
fire.enabled = not fire.enabled
end)
that should be good. If you want to be able to unequip the tool then I can help with that, I was thinking of using coroutines to check if the model is parented to a character and binding a clickdetector to keyboard input to drop the torch(not sure if that works)
The point is not to be “realistic” the point is to have better looking player models and mesh distortion this allows devs to make custom characters without having to break them a part with ugly joints
Code is my weakness. This will take a few days to manipulate. I do see some elements I have already incorporated.
Adding this update:
Got Robie’s script to work! The flame follows the rigid part just fine, which means the ClickDetector should now work too. I don’t have anything left to do here but code it all together! WOO!
I could not locate this, so I applied for the Beta Program. I thought I already did, but I found no evidence of that lol. Kind of wandering around blind on this one!
Does it work on the server too?, if not check out my post “Tool Holding Followup” and change the bone to your lefthand bone. Also instead of changing the part RightHand’s CFrame, change it to I a part(I guess you would name it LeftHand and parent it under the character) then just script your fake tool so that it will weld to the part LeftHand on the touched event.
I will probably try to replicate what you are trying to do and include those scripts/techniques