Transparancy Tool Change Gui

still not working so im not really sure honestly

What kind of errors are you getting and could you send me a screenshot of the script?

Im pretty sure there’s some invalid member your trying to set for your tool so errors should pop up like

Transparency is not a valid member of tool

when i click now theres no errors but its not changing anything

I think your tool might be messed up then, the script should work.

heres the script ee62f961577cd6e29bf2fc04255a27af

Try using this code (it should only work for one equip- when you equip the tool and click the button it should go transparent, unequipping it and equipping again should make it visible again):

local player = game:GetService("Players").LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
	if player.Character:FindFirstChild("Pizza") ~= nil then
		if player.Character:WaitForChild("Pizza"):IsA("Tool") then
			player.Character:WaitForChild("Pizza"):WaitForChild("Name of a Part in Pizza Tool").Transparency = 1
		end
	end
end)

To make it always invisible when button was clicked, you have to change transparency of the tool in Backpack and in Workspace. Code to do this:

local player = game:GetService("Players").LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
	if player.Character:FindFirstChild("Pizza") ~= nil then
		if player.Character:WaitForChild("Pizza"):IsA("Tool") then
			player.Character:WaitForChild("Pizza"):WaitForChild("Name of a Part in Pizza Tool").Transparency = 1
		end
	end
	
	if player.Backpack:WaitForChild("Pizza") ~= nil then
		player.Backpack:WaitForChild("Pizza"):WaitForChild("Name of a Part in Pizza Tool").Transparency = 1
	end
end)
1 Like

If you are changing the tool in StarterPack it won’t change it for the user. You need to go into the LocalPlayer’s Backpack and get the tool from there.

How would that work and what would i change in the script?

Im trying to make just one part change not the whole thing

The script you need is

local tool = game.Players.LocalPlayer.Backpack.Pizza
local pesto = tool.pesto
script.Parent.MouseButton1Click:Connect(function()

pesto.Transparency = 1

end)

still not working when i click it

You’re aren’t defining the right path for the text button. Script.Parent means your indexing the ScreenGui, rather than the button. You can move your local script under the button and use script.Parent or simply do Script.Parent.Texbutton

You have to unequip the item for that script to work.

nvm i got it to work thank you for the help

Try this from my last post on this topic:

The code should make the Part in the Workspace invisible and the Part in the Backpack invisible.

i got it to work thank you anyways tho

mark it solution so others know its solved :slight_smile: