Prompt triggered event not working after remote event

So I basically made a script where when you trigger a prompt, it will make a frame visible, and disable the prompt. In the frame, there is an exit button, in-case if you know someone decides they don’t want to interact with it, so when it gets clicked, the frame closes, and the prompt re-enables. Now this is where the issue lies, when you trigger the prompt after re-enabling it, it for some reason just doesn’t reopen the prompt again.

Here are the scripts:

server

local event = game.ReplicatedStorage.Scanners:WaitForChild("Kelp_Forest")
local exitevent = game.ReplicatedStorage.Scanners.exit_events:WaitForChild("KelpExit")

local prompt = script.Parent.ScreenPrompt.ProximityPrompt

local value = 1

exitevent.OnServerEvent:Connect(function()
	print("server fired")
	prompt.Enabled = true
end)

prompt.Triggered:Connect(function(player)
	if value == 1 then
		print("Triggered")
		local GUI = player.PlayerGui.Scanners:WaitForChild("V1")
		player.CameraMode = Enum.CameraMode.Classic
		GUI.Enabled = true
		prompt.Enabled = false
	end
end)

client

local event = game.ReplicatedStorage:WaitForChild("Scanners"):WaitForChild("Kelp_Forest")
local exitevent = game.ReplicatedStorage:WaitForChild("Scanners").exit_events:WaitForChild("KelpExit")

local button = game.Players.LocalPlayer.PlayerGui:WaitForChild("Scanners").V1.Frame.Buttons.Button_3
local exit = game.Players.LocalPlayer.PlayerGui:WaitForChild("Scanners").V1.Frame.Buttons.Exit
local unlock = game.Players.LocalPlayer.PlayerGui:WaitForChild("Scanners").V1.Frame.Unlocking

button.MouseButton1Click:Connect(function()
	unlock.Text = "Unlocking."
	wait(1)
	unlock.Text = "Unlocking.."
	wait(1)
	unlock.Text = "Unlocking..."
	wait(1)
	print("Unlocked!")
end)

exit.MouseButton1Click:Connect(function()
	exit.Parent.Parent.Parent.Enabled = false
	game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
	exitevent:FireServer()
end)

bear in mind that it does trigger the prompt, but it just wont open the frame.

Nevermind i solved it. All i did was i made another remote event to open the frame by firing the client in the server script and then opening the gui from there.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.