So I have a tool, and I want it to add on to the Players value each use
Code for tool (Local Script):
local Tool = script.Parent;
enabled = true
function onActivated()
if not enabled then
return
end
enabled = false
--Call Function--
local fatFunc = game.ReplicatedStorage:WaitForChild("hyh")
local addfat = fatFunc:InvokeClient(0.01)
game.Players.LocalPlayer.Data.Fatness.Value = game.Players.LocalPlayer.Data.Fatness.Value + addfat
--[[
local eat = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
local current = eat
current:Play()
--]]
wait(4.20)
enabled = true
end
script.Parent.Activated:connect(onActivated)
Server Script:
local fatFunc = game.ReplicatedStorage:WaitForChild("hyh")
function fatFunc.OnClientInvoke(value)
local addfat = 0.01
return addfat
end
Any help is appreciated and thanks in advanced :)

1 comment
Thank you so much I had been stuck on this for so long!