How to make a pickup notifier

I want to know how I can detect if player picked up an item and If yes I want there to be a text that popped up saying something like “You have picked up a Wood”. You dont need to really send the full script I just need to know how to detect if player picked up and item.

Please help me, thank you

1 Like

You can utilise the .ChildAdded event on said player.

Maybe use a ClickDetector Event so whenever a player clicks it, do the necessary server checks then use a RemoteEvent to fire to the client to create a notification. That’s the way I would do this.

Hi, could you send an example?

I use proximity prompt, also. What do you mean by server checks?

The process is still the same but with a Proximity Prompt Triggered event.

I mean, any checks you may do before firing the remote.

1 Like

Create a local function like so:

local function onChildAdded(instance)
	print("You have picked up " .. instance.Name)
end

Then call your function on the instance (the player’s inventory) you want to check and connect the function.

<player inventory>.ChildAdded:Connect(onChildAdded)
2 Likes

This doesn’t seem to work. Am I getting the player’s inventory correctly?

local Players = game:GetService("Players").LocalPlayer
local bacpkack = Players:WaitForChild("Backpack")

local function onChildAdded(instance)
	print("You have picked up " .. instance.Name)
end

bacpkack.ChildAdded:Connect(onChildAdded)

Ah nevermind, I used game.Players.LocalPlayer.Backpack . This one seems to work. Thanks!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.