Answered by
7 years ago Edited 7 years ago
Hello, Voideyz!
To find a thing on a part, you must use a if
and :FindFirstChild()
!
Working script:
1 | if game.Players.LocalPlayer.Backpack:FindFirstChild( "Hamburger" , 300 ) or game.Workspace [ game.Players.LocalPlayer.Name ] :FindFirstChild( "Hamburger" , 300 ) then |
2 | game.Workspace.Npc.NPC.TriggerBlock.Text.Value = ( "Wow thanks" ) |
3 | game.Workspace.Npc.NPC.TriggerBlock.Text.Text.Value = ( "Here have 100 candies! :D" ) |
4 | game.Workspace.Npc.NPC.TriggerBlock.Text.Text.Text.Value = ( "Bye! :)" ) |
5 | game.Players.LocalPlayer.leaderstats.Candy = game.Players.LocalPlayer.leaderstats.Candy + 100 |
Good Luck with your games!