while true do wait(.5) local Players = game:GetService("Players") local player = Players.LocalPlayer local character = player.Character if not character or not character.Parent then character = player.CharacterAdded:wait() end if character.Humanoid.Health == 90 then script.Parent.Transparency = 0.9 end end
so thats the coodee, im trying to make a thing to become more transparent when the player's health gets over to 90. its showing an error on line 5 ("local character = player.Character ") the error just shows " attempt to index nil with 'Character' "
This is a script, and so it cannot get the LocalPlayer through game.Players.LocalPlayer or through the service. Make this a LocalScript, and you can get the LocalPlayer that way.