Fire once only!

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 an announcement system but using chat and confirmation system.

  2. What is the issue? Include screenshots / videos if possible!
    robloxapp-20221121-1755363.wmv (513.3 KB)

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    —> Already but can’t find anything
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

-- Script (in Scriptservice)
game.Players.PlayerAdded:Connect(function(plr)
	local sendfrom = plr.Name
	plr.Chatted:Connect(function(msg)
		local SplitMessage = msg:split(" ")
		if SplitMessage[1] == "!ann" then
			local Theannounce = SplitMessage[2]
			local Reason = msg:split(Theannounce)[2]
			game.ReplicatedStorage.Admintopaneel.RemoteEvent.OnServerEvent:Connect(function()
				plr.PlayerGui.AdminPan.Announcement.Text.Text = Theannounce..Reason
			end)
		end		
	end)						
end)
-- Confirmation UI script

script.Parent.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.Admintopaneel.RemoteEvent:FireServer()
end)

you can destroy the script that fires after the first fire

Thank you for helping me out but I just use another method and it works. Thanks again…

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