I'm trying to make a berry that when you eat it, gives the person who ate it 45 Mana. However, the script in my tool will not recognize when it activates/the tool isnt activating at all! Also, there's no output errors. Can someone help me? Code:
local Tool = script.Parent
local player = game.Players.LocalPlayer
mouse = game.Players.LocalPlayer:GetMouse()
nomore = false
function onActivated()
print("activated")
if nomore == false then
print("eating berry")
nomore =true
script.EatSound:Play()
Tool.GripForward = Vector3.new(0,0,-1)
Tool.GripPos = Vector3.new(1.392,-0.663,-0693)
Tool.GripRight = Vector3.new(1,0,0)
Tool.GripUp = Vector3.new(0,1,0)
wait(2)
print("Mana Up!")
pxp = player.leaderstats.Mana.Value
player.leaderstats.Mana.Value = pxp + 45
script.Parent:Destroy()
end
end
Tool.Activated:connect(onActivated) -- Doesn't work at all?! WHAT?!
--Keep in mind this is in a LocalScript.. Regular scripts couldn't even work.

3 comments
I am confused as to what you are trying to make this script do I mean are you trying to make it so when the player left clicks this function runs or something? If so I can help you however tell me what you're trying to do please!
When the player left-clicks, it disables doing the thing again (so they dont spam mana) puts the berry at their mouth, then it adds 45 mana and deletes the tool.
...do bumps work?