So what I'm trying to do is make a ticket giver using a TextButton and a Remove Event. When the TextButton is clicked, the player that had its name inserted into a String Value will get the ticket. Everything works fine, but when a player would click the TextButton, the player would usually get more than 1 ticket. The more they do it, the more tickets they would get.
Local Script -
local TicketExchange = game.ReplicatedStorage.TicketExchange --Remote Event
script.Parent.MouseButton1Click:Connect(function()
local Name = script.Parent.Parent.Parent.PlayerName.Value --Player's Name from a String Value
TicketExchange:FireServer(tostring(Name))
end)
Script -
local TicketExchange = game.ReplicatedStorage.TicketExchange
local Ticket = game.ReplicatedStorage.Ticket --The Tool
TicketExchange.OnServerEvent:Connect(function(Player, Name)
local TicketClone = Ticket:Clone() --Cloning Ticket
TicketClone.Parent = game.Players[Name].Backpack --Giving the player the Ticket
end)

4 comments
real tired to look into it, but look for where you are creating your events. you are most likely creating an event somewhere every time the player clicks the button
most likely you have multiple mouseclick funcitons
Where is the gui stored?
make sure to add in a debounce on the mousebutton1click event.