You can write your topic however you want, but you need to answer these questions:
-
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
-
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:
-
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