I am cloning accessories to the player character using a remote event. Items are placed within Replicated Storage. My goal is to not allow multiple clones of the accessory The remote event is fired using a Button Gui. Clicking the button multiple times will result in multiple clones
The Script
local rs = game:GetService("ReplicatedStorage")
local af = rs:WaitForChild("Accessories")
local remotesFolder = af:WaitForChild("Remotes")
local RemoteEvent = remotesFolder.EquipHat --Remote Function
RemoteEvent.OnServerEvent:Connect(function(player, topic, info)
if topic == "Equip Accessory" then
local newAccessory = info:Clone() --Clone
newAccessory.Parent = player.Character --Places in player character
end
end)
I would very much prefer one click used to clone accessory and a second click deleting the clone But I am not advanced enough to understand how to go about doing so.
Any help is much appreciated.
