I am trying to make a level system where if you reach a certain level you will get a halo. First I am trying to give the halo which everybody gets which is the halo you get in level 0. The script I have made I think should work but for some reason it doesn’t. I do not see the problem.
local player = game.Players.LocalPlayer
local Level = player:WaitForChild(“levels”)
The code you sent is fine, but it could be better if you were to change it to the Server-Sided point of view:
game.Players.PlayerAdded:Connect(function(Player)
local Level = player:WaitForChild("Level")
Level.Changed:Connect(function() --This basically fires every time the Level Value is changed
if Level.Value >= 0 then
local Halo = game.ServerStorage.HaloFree:Clone()
Halo.Parent = Player.Character
end
end)
end)
Something along like this would do (And yes the formatting is bad cause mobile exists)
Make sure to also check if the player has the halo on join, like this, the player will only reveive the halo when the level value has changed, you may also want to give the player the halo upon joining.