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

This script should make player's health=to his level*100 but it works in roblox studio can you help?

Asked by
Echtic 128
7 years ago

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

    Player.Character.Humanoid.Health = Player.Character.Humanoid.MaxHealth

end)

1 answer

Log in to vote
1
Answered by 7 years ago

try this

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)
0
still nothing :/ do you have any other idea Echtic 128 — 7y
0
nvm it works thanks a lot mateeee Echtic 128 — 7y
Ad

Answer this question