Tool GUI Buttons Not Working

I know this problem probably sounds dumb, but, uhh, as the title suggests, my GUI on a tool doesn’t work. I’ve first tested the GUI out on StarterGUI, worked perfectly fine as in the video:

However, when I put it to use on a tool, it just doesn’t work at all.

I’ve been trying to find solutions/workarounds, but I couldn’t find any. Here’s what I’ve tried so far:

  • Putting the ScreenGUI in ReplicatedStorage
  • Disabling RequiresHandle
  • Using ChatGPT (mb for resorting to AI :sob:)

Here’s what it looks like in the model hierarchy thingy:

This is the GUICloner thing, made by… :pensive_face: ChatGPT:

local remote = script.Parent
local player = game.Players.LocalPlayer
local gui = game:GetService("ReplicatedStorage").PiggyRemote

remote.Equipped:Connect(function()
	if not player.PlayerGui:FindFirstChild(gui.Name) then
		wait(0.1)
		gui:Clone().Parent = player.PlayerGui
	end
end)

remote.Unequipped:Connect(function()
	local piggygui = player.PlayerGui:FindFirstChild(gui.Name)
	if piggygui then
		piggygui:Destroy()
	end
end)

Any solutions/workarounds y’all got? I’ve been at this for a while. I only know very basic stuff about scripting.

Was your goal to make the buttons work?

1 Like

Yes. All I want is the buttons to work.

1 Like

So let me get this straight, your UI only works WITHOUT using the tool?

Yeah, exactly. I’m trying to get the UI to work with the remote equipped.

The buttons don’t appear to work at all, they don’t even print. Are you sure that you have the scripts on your GUI even in-game?

I’m sure they’re in the GUI. Here. I moved the ScreenGUI to the Tool, for now.

Do you mind sending the script contents?