Invisibility button not working

Sorry I’m not the best at scripting.

1 Like

change your script to this

Player = script.Parent.Parent.Parent.Parent.Character

function click()
	Player.Head.Transparency = 1
	Player["Right Leg"].Transparency = 1
	Player["Right Arm"].Transparency = 1
	Player["Left Leg"].Transparency = 1
	Player["Left Arm"].Transparency = 1
	Player.Torso.Transparency = 1


end

script.Parent.MouseButton1Click:connect(function() click() end)

Hmmm, thats a custom rig? Because on roblox r6 you cant use

Player.RightArm

And yes

Player["Right Arm"] -- space in "Right" and "Arm"

And the same for the others parts

yea, exactly was i was trying to show him.

forgot about the acessories to be invisible, i’ll fix that in a min and send it.

Was about to say accessories lol

1 Like

fixed!

change to this-

Player = script.Parent.Parent.Parent.Parent.Character

function click()
	Player.Head.Transparency = 1
	Player["Right Leg"].Transparency = 1
	Player["Right Arm"].Transparency = 1
	Player["Left Leg"].Transparency = 1
	Player["Left Arm"].Transparency = 1
	Player.Torso.Transparency = 1
	
	for _,d in pairs(Player:GetDescendants()) do
		if d.ClassName=='Accessory' then
			d.Handle.Transparency = 1
		end
	end


end

script.Parent.MouseButton1Click:connect(function() click() end)
1 Like

Thank you it works It really helped out! I have a script to hide the players name and health so I don’t need to worry about that.

1 Like

oh actually, i also forgot to change the face to be invisible so change the script to this

Player = script.Parent.Parent.Parent.Parent.Character

function click()
	Player.Head.Transparency = 1
	Player.Head.face.Transparency = 1
	Player["Right Leg"].Transparency = 1
	Player["Right Arm"].Transparency = 1
	Player["Left Leg"].Transparency = 1
	Player["Left Arm"].Transparency = 1
	Player.Torso.Transparency = 1
	
	for _,d in pairs(Player:GetDescendants()) do
		if d.ClassName=='Accessory' then
			d.Handle.Transparency = 1
		end
	end


end

script.Parent.MouseButton1Click:connect(function() click() end)
1 Like

I already scripted that in myself but thank you. Also made it so you can be Visible.image

1 Like