Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

GetRankInGroup how does that work for VIP script?

Asked by 7 years ago
Edited 7 years ago

I have an problem with this script. How do I make this script work as giving VIP Rank >= 49 get 4 every ten mins?

LocalScript:

cript = true

wait(7) -- Time for player can get a chance for loading!

GroupId = 3141417 -- Group Id from the group the ranks is taken from.
TimeDelay = 2 -- (Every 10 Mins) How long time between the given Amount.
VipAmount = 4 -- The Value/Amount of Money that Group Vip Ranks get.

while true do
    wait(TimeDelay)
    game.Players.PlayerAdded:connect(function(Player)
        if Player:GetRankInGroup(GroupId) >= 49 then -- Gives Group Rank users over 49 VipAmount.
            Player.leaderstats.RIX.Value = Player.leaderstats.RIX.Value + VipAmount
        end
    end)
end

1 answer

Log in to vote
0
Answered by 7 years ago

Does this fix it?

GroupId = 3141417 -- Group Id from the group the ranks is taken from.
TimeDelay = 2 -- (Every 10 Mins) How long time between the given Amount.
VipAmount = 4 -- The Value/Amount of Money that Group Vip Ranks get.

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:wait()
while wait(TimeDelay) do
        if player:GetRankInGroup(GroupId) >= 49 then
            player.leaderstats.RIX.Value = player.leaderstats.RIX.Value + VipAmount
        end
end
end)

BTW: Your TimeDelay Variable is actually 2 seconds, but I'm guessing that's for testing purposes.

0
Thx, but I found my actual problem. The script also need to be in StarterPlayer > StarterPlayerScripts MineJulRBX 52 — 7y
0
Okay, but the one I have above is more efficient and faster, so I'd recommend using it, enjoy! User#4429 0 — 7y
Ad

Answer this question