This script does not work I think the problem is that I used for player in ipairs do and player:connect (function(function)
A problem only comes when I try add GetRankInGroup
Script:
Wait(7)
vipamount = 4 -- This variable is the amount of RIX Vips will get each time.
amount = 2 -- This variable is the amount of RIX we will give each time.
timedelay = 2 -- (600)This variable is the amount of seconds in between each time the RIX is rewarded
currencyname = "RIX" -- This is the name of our Currency
groupId = 3141417 -- Group ID from the Group ranks will be taken from
while true do
for _, player in ipairs(game.Players:GetPlayers()) do
game.Player.PlayerAdded:connect(function(player)
if player:FindFirstChild("leaderstats") then
if player:GetRankInGroup(groupId) >= 50 then
player.leaderstats.RIX.Value = player.leaderstats.RIX.Value + vipamount
else
player.leaderstats.RIX.Vaue = player.leaderstats.RIX.Value + amount
end
end
end)
end
end

2 comments
you crash your game by not waiting in your while loop. You create a PlayerAdded event every time the while loop runs, multiple times. (For EVERY player that's already in the game.) You gotta figure this out yourself..
I have been tried to make this script for a week now. Now I have it work. Thx.