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

How to access the StarterPack in a script?

Asked by 3 years ago

hello I have a quick question how do you access the starter pack in code, I wrote StarterPack but the output said it wasn't valid, any ideas?


script.Parent.Parent.Parent.Parent.StarterPack.G17.ACS_Modulo.Variaveis.Suppressor = true


1 answer

Log in to vote
0
Answered by 3 years ago

First, to access the StarterPack, you should use ther word Backpack, Secondly, you should get the player(it ' more recomendable than getting the backpack with script.Parent)

I will give you a little code that prints the name of a Tool that the player has in it's backpack in a LocalScript.

local plr = game:GetService('Players').LocalPlayer

local tool = plr.Backpack:FindFirstChildWhichIsA('Tool')

print(tool.Name)
Ad

Answer this question