Well, I have a problem with something from the FireServer and it is that I want to send a clone but when I send it I don’t know how to receive the clone with the OnServerEvent.
This is the Fire script:
local Button = script.Parent
local EnabledValue = script.Parent:FindFirstChild("Enabled")
local ChoosePlayerList = script.Parent.Parent.Parent.Parent.Parent:FindFirstChild("ChosenPlayers"):FindFirstChild("Players"):FindFirstChild("ScrollingFrame")
local AllPlayersList = script.Parent.Parent.Parent:FindFirstChild("ScrollingFrame")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event =ReplicatedStorage:FindFirstChild("PlayerListSelectionDrop")
local IDName = script.Parent:FindFirstChild("IdName")
local Player = game:GetService("Players").LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
Event:FireServer(Player, Button:Clone())
end)
This is the OnServerEvent:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:FindFirstChild("PlayerListSelectionDrop")
local Players = game:GetService("Players")
Event.OnServerEvent:Connect(function(Player, Clone)
local Gui = Players:FindFirstChild(Player.Name).PlayerGui:FindFirstChild("Configuracion")
local PlayerList = Gui:FindFirstChild("Playerlist")
local ChoosenList = PlayerList:FindFirstChild("ChosenPlayers"):FindFirstChild("Players"):FindFirstChild("ScrollingFrame")
Clone.Parent = ChoosenList
end)