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
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.