So, we’re proud to introduce our inaugural “A Year on Roblox” recap featuring some of the top highlights, reflections, and experiences brought to life on the platform in 2021. There’s no better way to point out some of the top trends we saw in 2021 than to look into the data. It was also great seeing our community express their identity by embracing and creating digital fashion items on Roblox. With this growth came a groundswell of talented developers who leveraged our latest technological advancements to create engaging and immersive experiences along with new genres. As we reimagine the way people come together through shared experiences, our community grew from 32.6 million daily active users in 2020 to nearly 50 million* across 180 countries.
If you cloned the tool into the player's Backpack previously, you can do Backpack.:Destroy() to get rid of it/make it dissapear.2021 was a transformative year for Roblox. Now we can do the same thing that we did to check for a humanoid, to check for our tool. Local player = game.Players:GetPlayerFromCharacter(hit.Parent)Īs you may know, Backpack is a direct child of the player in game.Players, so we can use player.Backpack to find our Backpack. Added to your code, here is what it should now look like. Either one work, but I will be using the first one for this example. This is similar to game.Players:FindFirstChild(.Name). A Character is just your player in game.workspace, so by calling this function, it gets your player in game.Players from your character. Now that we have verified that a player was what touched our part, we can use the function of game.Players called GetPlayerFromCharacter(). If hit.Parent:FindFirstChild("Humanoid") then You can do this by looking for a Humanoid, which would be a sibling of the part that touched.
Since any object can touch the part, but not every one has a Backpack, you'll want to first check if the object that hit your part is from an actual player. Print(hit.Name) -As per the example above, this would print "Left Foot" For example, if a player (R15) stepped on a block on the floor, the object that hit the part might be Left Foot. Touched event can carry one parameter the object that touched it. Touched event which fires every time an object is touched.