So i know how to make parts transparent and all but I can't seem to figure out how to get the user's part invisible when used. Can someone please tell me what function i need to use?
local holder = Instance.new("Folder",game.Lighting) holder.Name = "Accessory Storage" script.Parent.Activated:Connect(function() game.Players.LocalPlayer.Character.Head.face.Parent = holder for i,v in pairs (game.Players.LocalPlayer.Character:GetChildren()) do if v.ClassName == "MeshPart" then v.Transparency = 1 end game.Players.LocalPlayer.Character.Head.Transparency = 1 for i,v in pairs (game.Players.LocalPlayer.Character:GetChildren()) do if v.ClassName == "Accessory" then v.Parent = holder end end end wait(5) for i,v in pairs (game.Players.LocalPlayer.Character:GetChildren()) do if v.ClassName == "MeshPart" then v.Transparency = 0 end game.Players.LocalPlayer.Character.Head.Transparency = 0 for i,v in pairs (holder:GetChildren()) do if v.ClassName == "Accessory" then v.Parent = game.Players.LocalPlayer.Character end end end holder.face.Parent = game.Players.LocalPlayer.Character.Head end)
local tool = script.Parent local plr = script.Parent.Parent.Parent -- The Player holding the tool tool.Activated:Connect(function() if plr.Character.Humanoid.RigType = Enum.HumanoidRigType.R6 then -- Check for R6 plr.Character.Torso.Transparency = 1 plr.Character["Right Arm"].Transparency = 1 plr.Character["Right Leg"].Transparency = 1 plr.Character["Left Arm"].Transparency = 1 plr.Character["Left Leg"].Transparency = 1 plr.Character.HumanoidRootPart.Transparency = 1 plr.Character.Head.Transparency = 1 end if plr.Character.Humanoid.RigType = Enum.HumanoidRigType.R15 then -- Check for R15 plr.Character.HumanoidRootPart.Transparency = 1 plr.Character.Head.Transparency = 1 plr.Character.UpperTorso.Transparency = 1 plr.Character.LowerTorso.Transparency = 1 plr.Character.LeftUpperArm.Transparency = 1 plr.Character.LeftLowerArm.Transparency = 1 plr.Character.LeftHand.Transparency = 1 plr.Character.RightUpperArm.Transparency = 1 plr.Character.RightLowerArm.Transparency = 1 plr.Character.RightHand.Transparency = 1 plr.Character.LeftUpperLeg.Transparency = 1 plr.Character.LeftLowerLeg.Transparency = 1 plr.Character.LeftFoot.Transparency = 1 plr.Character.RightUpperLeg.Transparency = 1 plr.Character.RightLowerLeg.Transparency = 1 plr.Character.RightFoot.Transparency = 1 end end) tool.Deactivated:Connect(function() if plr.Character.Humanoid.RigType = Enum.HumanoidRigType.R6 then -- Check for R6 plr.Character.Torso.Transparency = 0 plr.Character["Right Arm"].Transparency = 0 plr.Character["Right Leg"].Transparency = 0 plr.Character["Left Arm"].Transparency = 0 plr.Character["Left Leg"].Transparency = 0 plr.Character.HumanoidRootPart.Transparency = 0 plr.Character.Head.Transparency = 0 end if plr.Character.Humanoid.RigType = Enum.HumanoidRigType.R15 then -- Check for R15 plr.Character.HumanoidRootPart.Transparency = 0 plr.Character.Head.Transparency = 0 plr.Character.UpperTorso.Transparency = 0 plr.Character.LowerTorso.Transparency = 0 plr.Character.LeftUpperArm.Transparency = 0 plr.Character.LeftLowerArm.Transparency = 0 plr.Character.LeftHand.Transparency = 0 plr.Character.RightUpperArm.Transparency = 0 plr.Character.RightLowerArm.Transparency = 0 plr.Character.RightHand.Transparency = 0 plr.Character.LeftUpperLeg.Transparency = 0 plr.Character.LeftLowerLeg.Transparency = 0 plr.Character.LeftFoot.Transparency = 0 plr.Character.RightUpperLeg.Transparency = 0 plr.Character.RightLowerLeg.Transparency = 0 plr.Character.RightFoot.Transparency = 0 end end)
If you have any questions, please ask.