GUI and part showing for everyone

I tried it again, and it still showed and deleted for everybody

Heres the output after I touched it:

Heres the full code in the script:

local Player = game.Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
local Part = game.workspace.Pinkegg --Defining the Part
print("Code online")

local function RemoveTool(Hit) --Creating the local function, which "Hit" is the first parameter for the "Touched" event
	print("Part touched")
	local Check = game.Players:GetPlayerFromCharacter(Hit.Parent) --Getting the Player from the Character Model
	if Check then --Checking if we have a player
		print("Enabling the GUI for: "..Player.Name)
		PlayerGui.PinkeggGet.Frame.Visible = true
		wait(.5)
		Part:Destroy()
	end
end

Part.Touched:Connect(RemoveTool)
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Gui = Player.PlayerGui:WaitForChild("PinkeggGet")
local Part = workspace:WaitForChild("Pinkegg")
local function ResearchCrate(Hit)
      Gui.Frame.Visible = true
      print("Gui Enabled")
      wait()
      Part:Destroy()
      Part = nil
end
Part.Touched:Connect(ResearchCrate)

Debugged script

It does not work :frowning: I have no idea what is happening right now, I have no idea why it works for other people but not me

Can you give the output image?

The one I posted before or a new one?

after my script, when you tested

Here it is:


Its says GUI enabled, but it also gives this error message

I don’t think that’s too much of an issue if you’re firing the event too much times, ok how about trying this place?

OkayWhat.rbxl (23.8 KB)

Check to make sure that the Part is still visible on the server-side, but not on the client-side

It works on your game, what the? I have no idea what is happening right now, All the steps shown I have done exactly the same

Add a debounce like this:
This occurred to my in my typewriter script, debounce fixed it.

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Gui = Player.PlayerGui:WaitForChild("PinkeggGet")
local Part = workspace:WaitForChild("Pinkegg")
local db = false
local function ResearchCrate(Hit)
if not db then
db = true     
 Gui.Frame.Visible = true
      print("Gui Enabled")
      wait()
      Part:Destroy()
      Part = nil
end
end
Part.Touched:Connect(ResearchCrate)

So I did a lot of just retyping the script, and deleting it and remaking it, and it finally worked, but only on roblox studio. The server side on studio doesn’t show the egg being deleted or the GUI showing, so I published the game and tested it on 2 different accounts, but it doesn’t work there. (I made one account touch the part, and the other stand there and it showed the GUI showing and the Part deleted on both accounts, In game.)

That’s strange, could it be a potential ROBLOX bug or something then? :thinking: I honestly don’t know what else the issue could be, but maybe try:

  • Reinstalling Studio
  • Enable API Services/HTTP Requests (Prob won’t work)
  • Contact ROBLOX Support I guess

Yeah, Ill do those. Thanks anyway for helping with this, much appreciated. I’ll call this one a day for now and move on to other things

1 Like