Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there any way to get the meshId of the character and set it to the meshId of a dummy?

Asked by 6 years ago

in the output, there's an error saying: "Unable to assign property MeshId. Script write access is restricted"

How do I assign the meshId of the dummy to the one on the character? Please help me.

1 answer

Log in to vote
0
Answered by
mattscy 3725 Moderation Voter Community Moderator
6 years ago

Assuming you mean copying the packages of the character on to the dummy, you would do something like this in a server script. Keep in mind you have to set the character and dummy variables to make it work:

local character = --set to player character
local dummy = --set to dummy model
for _,v in pairs(character:GetChildren()) do
   if v:IsA("CharacterMesh") then
      local c = v:Clone()
      c.Parent = dummy
   end
end

This should automatically copy the CharacterMeshes from the player into the dummy.

Otherwise, if you just wanted to only translate the MeshId across, you could do something like

dummyMesh.MeshId = characterMesh.MeshId

where the variables of dummyMesh and characterMesh would be the CharacterMeshes of the character and dummy.

0
I want to do the second thing, but when I do it makes that error in the output. Unbunn_makes 48 — 6y
0
What exactly are you doing this for and what context are you doing it in? Is it only transferring specific MeshIds? Does it occur when the player touches something? mattscy 3725 — 6y
0
it occurs when the player clicks a button, it's supposed to make a dummy look exactly like the character. It's not supposed to be FE by the way. Unbunn_makes 48 — 6y
0
In that case you should be able to clone the player's character and replace the dummy with the clone. mattscy 3725 — 6y
View all comments (7 more)
0
I've tried that but it doesn't work (when it's in a mousebutton1down function) :/ Unbunn_makes 48 — 6y
0
I put it in a localscript maybe that is why. Unbunn_makes 48 — 6y
0
Oh I just remebered, you have to set the Archivable property of the character to true before you can clone it. mattscy 3725 — 6y
0
I've tried to put it in a script but you can't use mousebutton functions in the script. So I think I cannot clone the character Unbunn_makes 48 — 6y
0
You can use RemoteEvents to send a message to the server when the MouseButton1Down event occurs on the client. However, if your game is not FE then you should be able to do it entirely with a LocalScript mattscy 3725 — 6y
0
The thing is I don't want to use remote events in it, my game is FE but I want it so only the client sees it, and it doesn't affect the other players. So I don't want it to be FE. Unbunn_makes 48 — 6y
0
I've made a full FE avatar editor and I have a fear that it may cause too much lag, here is the link if you want to see it: https://www.roblox.com/games/1207279914/Avatar-Editor-Tester , the thing is I feel like making one that is FE is a bad idea I should just make it all not FE and then when the player presses done it will fire a remote event that will clone everything and put it inside the char Unbunn_makes 48 — 6y
Ad

Answer this question