Alright so basically I need to make a block turned into a hat. How would I use a script to complete that?
✓ ANSWER ACCEPTED
How do I insert a mesh into a block using a script?
2 answers
✓ Accepted answer
Create a new mesh, and then parent it to the part:
Instance.new("SpecialMesh", game.Workspace.Part)
If you wanted to make it simpler by using the :Clone() function you could do this:
Put a mesh in lighting, or somewhere else, then add a script wherever. Let's say when you hit a part, it will clone a mesh from lighting, and place it in your torso.
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if hit.Parent:FindFirstChild("Torso") then
cloneMesh = game.Lighting.Mesh:Clone()
cloneMesh.Parent = hit.Parent.Torso
end
end
end)
There you go!
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Alright Thanks alot man! :D
No problem!