#y ts nut w*rk
1 messages · Page 1 of 1 (latest)
ofc its not working you put it in startercharscripts
Have you tried doing a local script?
put local script in starterplayerscripts
if you put it under charScripts it puts it under character itself so the Player variable is char
He is finding the humanoid which is in the character
But yeah do a local script and see what happens @tranquil flicker
also rename player to char so you dont get confused
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Strength = Character:WaitForChild("Strength")
Strength.Value.Changed:Connect(function()
print(Strength.Value)
Humanoid.MaxHealth = Strength.Value+100
print("Test")
end)
this is what I came up with and it comes out as
PlayerScripts.LocalScript:3: attempt to index nil with 'WaitForChild'
if youre putting it under startercharscripts just do character = script.Parent
rn its in starter character as a local script
local Player = script.Parent
local Humanoid = Player.Humanoid
local Strength = Player.Strength
Strength.Value.Changed:Connect(function()
print(Strength.Value)
Humanoid.MaxHealth = Strength.Value+100
print("Test")
end)
and it comes out as LocalScript:5: attempt to index number with 'Changed'
dont do .value do GetPropertyChangedSignal("Value")
how do I implement it
Strength:GetPropertyChangedSignal("Value"):Connect(function()
GetPropertyChangedSignal is not a valid member of RBXScriptSignal