I've been trying to make this script work but no luck so far.
player = game.Player.LocalPlayer
local character = player.Character
MeshInsert = Instance.new("SpecialMesh", character.HumanoidRootPart)
I've been trying to make this script work but no luck so far.
player = game.Player.LocalPlayer
local character = player.Character
MeshInsert = Instance.new("SpecialMesh", character.HumanoidRootPart)
The second argument of Instance.new() is deprecated, which means you shouldn't use it anymore, and HumanoidRootPart has a transparency of 1, meaning you can't see it. Even with a mesh, I would suggest using Torso (R6) instaid of HumanoidRootPart. If your game is R15, just change the UpperTorso and LowerTorso mesh as they already are MeshParts.
-----------------------------------------------------------------------R6
player = game.Player.LocalPlayer
local character = player.Character
MeshInsert = Instance.new("SpecialMesh")
MeshInsert.Parent = character.Torso
MeshInsert.MeshId = "" --your mesh id
MeshInsert.TextureId = "" --your mesh texture id
-----------------------------------------------------------------------R15
player = game.Player.LocalPlayer
local character = player.Character
local Torso = character.UpperTorso
Torso.MeshId = "" --your (first) mesh id
Torso.TextureID = "" --your (first) mesh texture id
local Torso = character.LowerTorso
Torso.MeshId = "" --your (second) mesh id
Torso.TextureID = "" --your (second) mesh texture id
And if you NEED to use HumanoidRootPart, here you go:
player = game.Player.LocalPlayer
local character = player.Character
MeshInsert = Instance.new("SpecialMesh")
MeshInsert.Parent = character.HumanoidRootPart
MeshInsert.MeshId = "" --your mesh id
MeshInsert.TextureId = "" --your mesh texture id
character.HumanoidRootPart.Transparency = 0
--make sure the Torso (R6) or UpperTorso & LowerTorso (R15) are invisible by making thier transparency 1, otherwise it would look kinda wierd.
I hope this helped you!
FE SERVER SCRIPT EDITION:
game.Players.PlayerAdded:Connect(function(plr)
repeat wait() until game.Workspace:FindFirstChild(plr)
local character = game.Workspace:FindFirstChild(plr)
--from here the rest of the code is the same
MeshInsert = Instance.new("SpecialMesh")
MeshInsert.Parent = character.HumanoidRootPart
MeshInsert.MeshId = "" --your mesh id
MeshInsert.TextureId = "" --your mesh texture id
character.HumanoidRootPart.Transparency = 0
--make sure the Torso (R6) or UpperTorso & LowerTorso (R15) are invisible by making thier transparency 1, otherwise it would look kinda wierd.
end) --don't forget this end!
It works, but how would I make it work with FilteringEnabled?
game.Players.ChildAdded:Connect(function(plr) repeat wait() until game.Workspace:FindFirstChild(plr.Name) local character = game.Workspace:FindFirstChild(plr.Name)
end)
Replace the first couple of lines of code with the new one, I'll edit the answer.
Alright, thanks!
I tried using it but it would not work. I tried several different solutions such as adding local in front of MeshInsert. I also tried to see what was going on in the output tab but there was nothing.
Never mind, I have fixed it. Thank you for your effort! I really appreciate it.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Don't use the 2nd argument of Instance.new() It's deprecated.