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

Give items too people but don't know the script for it?

Asked by 4 years ago
Edited by M39a9am3R 4 years ago

Please encode Lua code in the Lua block code tag (look for the Lua icon in the editor).

Hello, I have had a lot of trouble with giving people items with this panel I created this is the script I have for the basic start, I have no clue where too go from here

game.ServerStorage.AwardItem:Invoke(Player,ItemId,Amount)

and I have it setup with ItemId, Player, Amount and I also have give 100 and I have the script for that too

for i=1,#game.ReplicatedStorage.Items:GetChildren() do   
    game.ServerStorage.AwardItem:Invoke(game.Players.Player,i,100)
    wait()
end game.ServerStorage.AwardItem.Invoke(game.Players.Player,game.ReplicatedStorage{"itemname"}.ItemId.Value,

I have NO clue where they go what they go in, what kind of script it is, the coding for the script, placement, or ANYTHING about this whole giving items too players, I have the panel setup and I just can't get it too type in the text box and click the give button I also need a code for give button or give items when you click it, it will give you the items that are inside of the boxes above. I have no clue how too do any of that..

https://cdn.discordapp.com/attachments/679039737058557990/681158594435088415/unknown.png

^^Link too the image of the panel

0
Attempted editing for proper formatting, please use indentation and appropriate syntax. M39a9am3R 3210 — 4y
0
By "item", do you mean "tool"? I only ask because giving a player 100 tools seems a bit much for any purpose... compUcomp 417 — 4y
0
It's probably an exploiter trying to ruin a game. relatlves 17 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

You put a "," at the end of line 4.

for i=1,#game.ReplicatedStorage.Items:GetChildren() do   
    game.ServerStorage.AwardItem:Invoke(game.Players.Player,i,100)
    wait()
end 

game.ServerStorage.AwardItem.Invoke(game.Players.Player,game.ReplicatedStorage{"itemname"}.ItemId.Value
Ad

Answer this question