Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

Help with Remote Function

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!
Status
Not open for further replies.

darkblooood

New Member
Reputation: 0 / 0 / 0
Jan 19, 2018
11
0
1
24
United States
I need a tool to add to a Players stats in my game and have been working on this for ages

tool:
Lua:
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:

Lua:
local fatFunc = game.ReplicatedStorage:WaitForChild("hyh")


function fatFunc.OnClientInvoke(value)
        local addfat = 0.01           
        return addfat       
end
 
Status
Not open for further replies.