local user = script.Parent.TextBox.Text
local item = player.Character:FindFirstChildOfClass(“Tool”)
local cloneditem = item:Clone()
cloneditem.Parent = game.Players(user).BackPack
If this is a server script, you shouldn’t be manipulating UI on the server. This is a bad practice and is what LocalScripts are for. Just use a LocalScript instead, and fire a RemoteEvent when they click. Then on the server, it will say which player it was and you can use that to give them the tool.
Edit: If this is already a local script, the part where you give them the tool won’t replicate to other clients. Same solution as above; use RemoteEvents.
Studio as in a plugin or something? either way you cannot put player as argument in a MouseButton1Click event, they don’t return the player that clicked, they return nothing (nil)