Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

[SOLVED] I am Stuck on Making Hand-to GUI for my Roleplay Group?

I am trying to make one of those big roleplay groups and I need a Hand-to GUI so cashiers can give the customers their food.

I would at least try this but I have absolutely no idea how to even start. Be aware this is not a request I would just like some help on how to make it.

2 comments

0

The things you need is the button to open the Hand-To GUI. Have a textbox, have a "give" button somewhere on the GUI. Now for this part you will to use in pairs to check in Players if the name the cashier typed in is on the PlayerList, if it is, fire a remote like this, "remote:FireServer(playerToGive). Then you can clone the tool in on server

0

I dont think that was a good explanation so i'll make a simple overview of the script

1 answer

✓ Accepted answer
local GUI = script.Parent
local button = GUI.Button
local textbox = GUI.TextBox
local remote = game.ReplicatedStorage.Remote

button.MouseButton1Down:Connect(function()
for i,v in pairs (game.Players:GetPlayers()) do
if v.Name == textbox.Text then
remote:FireServer(v, rank)
end
end
end)

-- Server
local remote = game.ReplicatedStorage.Remote
remote.OnServerEvent:Connect(function(p, playerToGive)
if p.Rank == "Cashier" then
if playerToGive ~= "" then
	local tool = game.ReplicatedStorage.Tool:Clone()
	tool.Parent = playerToGive.Backpack
end
end
end)

-- I added that extra rank if statement so exploiters cant abuse this

2 comments

1

woops i was meant to type remote:FireServer(v) not remote:FireServer(v, rank)

0

Thanks I will try this out and accept as answer if it works.

This discussion is preserved as it was. New answers, comments, and votes are closed.