Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Ok so, i need to make a script that allows me to give a tool to another player, can anyone help me?

Asked by 2 years ago

Ok so, i don't know if any of yall played east brickton, but when you equip a gun or a tool, you can say /give name of the player and it will give to the other player the tool, i need a script that can help me with that

2 answers

Log in to vote
0
Answered by
manith513 121
2 years ago

This is not a request site. Show us the code you have problems and bugs with before blindly asking for a script. On another note, use a remote event for when a player inputs the command, then when its fired in the server check if player has the permissions to use the command along with the parameters sent which is the player the command is being used on. Then just insert the tool into the player's folder.

Ad
Log in to vote
0
Answered by
NykoVania 231 Moderation Voter
2 years ago

Make a tool then put it in serverstorage, you can use :Clone() on the tool and set the parent to the players backpack you want to give it to.

Example:

game.ReplicatedStorage.RemoteEvent.onServerEvent:Connect(function(player, givetoplayer)
    game.ServerStorage.Tool:Clone().Parent = game:GetService("Players")[givetoplayer].Backpack
end)

Answer this question