local clickDetector = script.Parent
local Apple = game.Lighting:WaitForChild("Apple")
script.Parent.MouseClick:connect(function(plr)
if plr.StarterPack then
plr.StarterPack:Add(Apple)
end
end)
Ok so i have an object called "Apple" in the Lighting section of my game. I am trying to make it where when a player clicks on the tree, it gives the player the apple in the lighting section. I am also trying to make it where you can only get a maximum amount of two apples out of one tree but i dont know how to do that. PLEASE HELP!

2 comments
thanks, i would approve the answer but some jerk keeps devoting me every time i post... But it really did help so thanks
No Problem! You Just taught me something new by giving me the part you did!