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

Access the backpack through a Server Script?

Asked by 10 years ago

I have FilteringEnabled, and I have a code that handles shooting a gun, but I need to get the player's backpack in order for it to work. How would I get the player's backpack through a server script? (non-local)

I also tried putting the value from hopperbin inside of character, but it just prints nil when I try to call the values:

player = 'killerkill29'
char = game.workspace:FindFirstChild(player)
ammo = char:FindFirstChild('Ammo')
clip = char:FindFirstChild('ClipSize')
0
If the gun is equipped, then it will be in the character, so you could just do game.Players:GetPlayerFromCharacter(gun.Parent). This is a comment because I am not sure this is what you are asking and I don't want to get spammed with down-votes VariadicFunction 335 — 10y
0
It is a Hopperbin, and those do not go inside the character. killerkill29 35 — 10y

Answer this question