GUI not working properly

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear! I want to make a gui settings gui that appears when you click the ProximityPrompt and dissapears when you close it

  2. What is the issue? Include screenshots / videos if possible!
    The menu appears the first time, then closes properly, but doesnt appear later no matter what:

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub? I tried debugging it with various prints but nothing worked

Here are the scripts I wrote:

script.Parent.launcher.Union.ProximityPrompt.Triggered:Connect(function(player)
	player.PlayerGui.Launcher.Frame.Position = UDim2.new(0.286, 0, 1.2, 0)
	player.PlayerGui.Launcher.Enabled = true
	game.TweenService:Create(player.PlayerGui.Launcher.Frame, TweenInfo.new(0.2, Enum.EasingStyle.Back), {Position = UDim2.new(0.286, 0, 0.2, 0)}):Play()
	game.ReplicatedStorage.Remotes.GuiBlur:FireClient(player, 1)
end)
game.ReplicatedStorage.Remotes.GuiBlur.OnClientEvent:Connect(function(action)
	if action == 1 then
		game.TweenService:Create(game.Lighting.Blur, TweenInfo.new(0.2, Enum.EasingStyle.Sine), {Size = 24}):Play()
	else
		game.TweenService:Create(game.Lighting.Blur, TweenInfo.new(0.2, Enum.EasingStyle.Sine), {Size = 0}):Play()
	end
end)
script.BindFunc.OnInvoke = function(action)
	if action == 1 then
		game.TweenService:Create(game.Lighting.Blur, TweenInfo.new(0.2, Enum.EasingStyle.Sine), {Size = 24}):Play()
	else
		game.TweenService:Create(game.Lighting.Blur, TweenInfo.new(0.2, Enum.EasingStyle.Sine), {Size = 0}):Play()
	end
end
script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.Parent.Enabled = false
	game.Players.LocalPlayer.PlayerGui.blur.BindFunc:Invoke(0)
end)

The BindableEvent and the remote event work completely fine

I remember I once had an issue like this, it was caused by toggling the gui through the server.

Can you try toggle it through a remote event and on the client? Might fix it.

2 Likes