So I'm trying to send a name to a reciving script and then that script will find the player in the workspace, check if a part that is in the list is in the player, then clone it and put it in workspace.
The only reason I'm doing this is because of filtering enabled
The sending script: (Local)
local Player = game.Players.LocalPlayer
Mouse.Button1Down:connect(function()
local name = Player.Name
game.Workspace.BlockInserter.BlockInsertation:Invoke(name)
end)
The receiving script: (Normal)
NormalParts = {"Slab","Wall","Plate"}
script.BlockInsertation.OnInvoke = function(name)
local chil = game.Workspace[name]:GetChildren()
for i, v in pairs (NormalParts) do
if chil.Name == v then
local clone = name[v]:Clone()
clone.Parent = game.Workspace
else
-- game.Players.player.PlayerGui.MoneyDisplay.ErrorDisplay.Description.Text = "Undefined part value: "..i.."
-- game.Players.player.PlayerGui.MoneyDisplay.ErrorDisplay:TweenPosition(UDim2.new(0.8, 0,0.9, 0),"InOut","Elastic",2.6,false)
-- wait(15)
-- game.Players.player.PlayerGui.MoneyDisplay.ErrorDisplay:TweenPosition(UDim2.new(-1, 0,0.9, 0),"InOut","Elastic",2.6,false)
end
end
end

2 comments
Did you use a RemoteEvent or a RemoteFunction when you tried my script?
I used RemoteEvent