Here is the script
local Player = game.Players.LocalPlayer --get the local player local LVL = Player:WaitForChild("LevelingSystem"):WaitForChild("Lvl") --common reason as to why some LocalScripts don't work in studio, things haven't loaded in LVL:GetPropertyChangedSignal("Value"):Connect(function() Player.Character.Humanoid.MaxHealth = LVL.Value * 100 wait(0.1) Player.Character.Humanoid.Health = Player.Character.Humanoid.MaxHealth end)
put in starterpack so it spawns with each person, if that is what you mean, otherwise i dont understand.
This one is going to be really simple. We will simply connect the function you already made to the CharacterAdded event for the player.
local Player = game.Players.LocalPlayer --get the local player local LVL = Player:WaitForChild("LevelingSystem"):WaitForChild("Lvl") --common reason as to why some LocalScripts don't work in studio, things haven't loaded in function levelup() local humanoid = Player.Character:WaitForChild("Humanoid") humanoid.MaxHealth = LVL.Value * 100 wait(0.1) humanoid.Health = Player.Character.Humanoid.MaxHealth end LVL:GetPropertyChangedSignal("Value"):Connect(levelup) Player.CharacterAdded:Connect(levelup)
Closed as Non-Descriptive by hiimgoodpack, lukeb50, Thundermaker300, and Goulstem
This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.
Why was this question closed?