Stop GUI from flickering

Hey all, I was wondering how I would could make it so the GUI doesn’t flicker once a player steps on it.

This is what it looks like:

I have got the current code, however I don’t know how to achieve this:

	local Player = game.Players:GetPlayerFromCharacter(touch.Parent)
	Player.PlayerGui.SafeGUI.Enabled = true

	local Player = game.Players:GetPlayerFromCharacter(leave.Parent)
	Player.PlayerGui.SafeGUI.Enabled = false

I presume I could use some sort of debounce, but I’m not sure how I would do this as it’s a server script.

Using .TouchEnded is pretty glitchy. Try using Regions instead of .TouchEnded event also do not do this on server. You might want to fire a remote to client to do changes for their PlayerGui.

Here’s an open sourced module for Regions, pretty useful and easy to use:

1 Like

This helped greatly, appreciate it!