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

How To Make An Aura That A Player Unlocks At A Certain Level/Rebirth?

Asked by 3 years ago

Hi, I'm trying to make a aura the player gets once they reach a certain lvl or rebirth. I have a ServerScript in StarterCharacterScripts to handle this, the output shows no errors or anything printed as told.

Here is the script:

game.Players.PlayerAdded:Connect(function(player)
    local Aura = game.ReplicatedStorage.Auras.Lightning
    player.CharacterAdded:Connect(function(Char)
        if player.leaderstats.Levels.Value >= 50 and player.leaderstats.Rebirths.Value >= 5 then
            Aura:Clone().Parent = Char.HumanoidRootPart
           print("Given")
        end
    end)
end)

1 answer

Log in to vote
0
Answered by 3 years ago

Try putting the script in ServerScriptService. If that doesn’t work then instead of making the aura on the HumanoidRootPart, put it on the torso

0
Also btw, you should run a loop for this script since it only runs when the player joins. If you have a data store written already then there’s no need for this abstractedfrostbite 110 — 3y
0
I already tried both ways, I then get an error leaderstats are not a member of player. Itz_Visually 17 — 3y
Ad

Answer this question