Hello! I have been recently trying to make a hand-to system and I have a problem, here is basically how the system works: A Gui appears and the worker has in hand the item that they wan’t to give to the customers, and they type the name of the customer into the textbox. If the player is nil it will return a nil value, if its not it will give the customer the item, here are some screenshots:
-- # The script is in a local script
-- // VARIABLES \\ --
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
-- // MAIN CODE \\ --
script.Parent.Parent.HandToFrame:TweenSize(UDim2.new(0, 673,0, 65), "In", "Quint", 0.2)
wait(0.4)
script.Parent.Parent.HandToFrame.TextBox.Visible = true
if script.Parent.Parent.HandToFrame.TextBox.Text == Player.Name then
return Player.Name..false
else
for _,v in pairs(Player.Backpack:GetChildren()) do
v:Clone().Parent = game.Players:FindFirstChild(script.Parent.Parent.HandToFrame.TextBox.Text).Backpack
end
end