This line will not work in server scripts. I would advise this script:
local part = script.Parent
game.Players.PlayerAdded:Connect(function(plr)
local function changeColor()
if plr.Character:WaitForChild("Humanoid").Health >= 75 then
part.Color = Color3.fromRGB(0,255,0)
elseif plr.Character:WaitForChild("Humanoid").Health >= 50 then
--you know the rest, just continue your original script from here but make sure to use the variable "plr"