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

How do I prioritize certain scripts?

Asked by 4 years ago
Edited 4 years ago

Script:

local Players = game:GetService('Players')


Players.PlayerAdded:Connect(function(player)
    if player:GetRankInGroup(GroupID) >= 255 then
        player.CharacterAdded:Connect(function(character)
            character:WaitForChild('Humanoid')
            character.Humanoid.MaxHealth = 450
            character.Humanoid.Health = 450
        end)
    end
end)

This script is for modifying the health of people in different groups. It works well when they're only in the one group, but, it could be risky if they're in multiple. The system my group uses is a branch system. So the main group is the government, branches are army, and then there are divisions in each one. This means that the amount of groups that their health is supposed to be boosted for adds up quickly, especially for the owner of all the groups (in this case, me). I fear that at launch people's health will be randomized since I separate the scripts by folder. Is there a way I could prioritize certain scripts over others.

Ex: If you're in the army, and the special forces division, you will get the health of the special forces division because it's a higher priority.

Answer this question