#y ts nut w*rk

1 messages · Page 1 of 1 (latest)

tranquil flicker
#
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)

nothing gets printed

#

its a server script inside startercharacterscripts

safe marsh
#

ofc its not working you put it in startercharscripts

tranquil flicker
#

what differernce does it make?

#

all I know is the location

pastel dirge
safe marsh
#

put local script in starterplayerscripts

safe marsh
pastel dirge
safe marsh
#

nvm

#

put it in startercharacterscripts

pastel dirge
#

But yeah do a local script and see what happens @tranquil flicker

safe marsh
#

also rename player to char so you dont get confused

tranquil flicker
#
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'

safe marsh
tranquil flicker
#

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'

safe marsh
#

dont do .value do GetPropertyChangedSignal("Value")

tranquil flicker
safe marsh
#

Strength:GetPropertyChangedSignal("Value"):Connect(function()

tranquil flicker
#

GetPropertyChangedSignal is not a valid member of RBXScriptSignal

safe marsh
#

mb it should be .

#

replace first colon

tranquil flicker
#

nvm it was my fault I changed the strength variable you were right the first time

#

thanks