So I have a script that has been put in a chat command It is having trouble with the meshes (I can't find any other way to make faces transparent besides edit the mesh ID, if there is a way to make the face transparent (And back) other than mesh ID, just post that then, Lines 17 and 30. The code works except for it fails to bring back the head and face. Error in console: MeshContentProvider failed to process 0 because 'could not fetch' MeshContentProvider failed to process 82992952 because 'could not fetch'
god = game.Players.DontBlinkDrWho function onChatted(msg) if msg == "invis" then local a = game.Players.DontBlinkDrWho local mouse = a:GetMouse() mouse.KeyDown:connect(function(key) if key == "q" then local p = game.Workspace.DontBlinkDrWho p.Head.Transparency = 1 p["Left Arm"].Transparency = 1 p["Right Arm"].Transparency = 1 p["Left Leg"].Transparency = 1 p["Right Leg"].Transparency = 1 p.Torso.Transparency = 1 p["Ultra-Fabulous Hair"].Handle.Transparency = 1 p.Head.Mesh.MeshId = 0 end end) mouse.KeyDown:connect(function(key) if key == "e" then local p = game.Workspace.DontBlinkDrWho p.Head.Transparency = 0 p["Left Arm"].Transparency = 0 p["Right Arm"].Transparency = 0 p["Left Leg"].Transparency = 0 p["Right Leg"].Transparency = 0 p.Torso.Transparency = 0 p["Ultra-Fabulous Hair"].Handle.Transparency = 0 p.Head.Mesh.MeshId = 82992952 end end) end end god.Chatted:connect(onChatted)
.MeshId
is a string, not a number -- it's a URL. You should set it to "rbxassetid://82992952"
rather than 82992952
.
Tab your code correctly!
You should be able to modify the .Transparency
property of the face
decal instead of dealing with meshes.
Here is the script - it will turn you invisible (just change the values from 1 to 0 so it will turn you visible)
Face is a decal in player's head. It is called "face"
local plrchar = god.Character for i,v in pairs(plrchar:GetChildren()) do if v:IsA("Part") then v.Transparency = 1 elseif v:IsA("Hat") then v.Handle.Transparency = 1 end if v.Name == "Head" then v.face.Transparency = 1 end end